hubspot.crm.property
Module hubspot.crm.property
API
Definitions
![](https://bcentral-packageicons.azureedge.net/images/ballerinax_hubspot.crm.property_2.0.0.png)
ballerinax/hubspot.crm.property Ballerina library
Overview
This is a generated connector from HubSpot OpenAPI specification.
All HubSpot objects store data in default and custom properties. These endpoints provide access to read and modify object properties in HubSpot.
Prerequisites
Before using this connector in your Ballerina application, complete the following:
- Create a HubSpot developer account
- Obtain tokens
- Use this guide to obtain the credentials which are needed to create the <CLIENT_ID> and <CLIENT_SECRET>
Quickstart
To use the HubSpot CRM Properties connector in your Ballerina application, update the .bal file as follows:
Step 1 - Import connector
First, import the ballerinax/hubspot.crm.property module into the Ballerina project.
import ballerinax/hubspot.crm.property;
Step 2 - Create a new connector instance
You can now make the connection configuration using the access token.
property:ClientConfig clientConfig = { auth : { token: <ACCESS_TOKEN> } }; property:Client baseClient = check new Client(clientConfig);
Step 3 - Invoke connector operation
- Create a property instance
property:Property property = { groupName: "contactinformation", hidden: false, displayOrder: 0, options: [ { label: "Option A", description: "Choice number one", value: "A", displayOrder: 1, hidden: false } ], label: "My Contact Property", description: "", fieldType: "select", name: "name", 'type: "enumeration" }; property:Property|error bEvent = baseClient->create("deals", property); if (bEvent is property:Property) { log:printInfo("Created the property" + bEvent.toString()); } else { test:assertFail(msg = bEvent.toString()); }
- List properties
property:CollectionResponseProperty|error bEvent = baseClient->getAll("deals"); if (bEvent is property:CollectionResponseProperty) { log:printInfo("Property list" + bEvent.toString()); } else { log:printError(msg = bEvent.message()); }
- Use
bal run
command to compile and run the Ballerina program
Clients![](/images/permalink.svg)
hubspot.crm.property: Client![](/images/permalink.svg)
This is a generated connector from HubSpot OpenAPI specification. All HubSpot objects store data in default and custom properties. These endpoints provide access to read and modify object properties in HubSpot.
Constructor![](/images/permalink.svg)
Gets invoked to initialize the connector
.
The connector initialization requires setting the API credentials.
Create a HubSpot account and obtain OAuth tokens following this guide.
init (ClientConfig clientConfig, string serviceUrl)
- clientConfig ClientConfig - The configurations to be used when initializing the
connector
- serviceUrl string "https://api.hubapi.com" - URL of the target service
getAll![](/images/permalink.svg)
function getAll(string objectType, boolean archived) returns CollectionResponseProperty|error
Read all properties
Parameters
- objectType string - CRM object type
- archived boolean (default false) - Whether to return only results that have been archived.
Return Type
- CollectionResponseProperty|error - successful operation
create![](/images/permalink.svg)
function create(string objectType, PropertyCreate payload) returns Property|error
Create a property
batchArchive![](/images/permalink.svg)
function batchArchive(string objectType, BatchInputPropertyName payload) returns Response|error
Archive a batch of properties
batchCreate![](/images/permalink.svg)
function batchCreate(string objectType, BatchInputPropertyCreate payload) returns BatchResponseProperty|error
Create a batch of properties
Return Type
- BatchResponseProperty|error - successful operation
batchRead![](/images/permalink.svg)
function batchRead(string objectType, BatchReadInputPropertyName payload) returns BatchResponseProperty|error
Read a batch of properties
Parameters
- objectType string - CRM object type
- payload BatchReadInputPropertyName - Property name input array
Return Type
- BatchResponseProperty|error - successful operation
groupsGetall![](/images/permalink.svg)
function groupsGetall(string objectType) returns CollectionResponsePropertyGroup|error
Read all property groups
Parameters
- objectType string - CRM object type
Return Type
- CollectionResponsePropertyGroup|error - successful operation
groupsCreate![](/images/permalink.svg)
function groupsCreate(string objectType, PropertyGroupCreate payload) returns PropertyGroup|error
Create a property group
Return Type
- PropertyGroup|error - successful operation
groupsGetbyname![](/images/permalink.svg)
function groupsGetbyname(string objectType, string groupName) returns PropertyGroup|error
Read a property group
Return Type
- PropertyGroup|error - successful operation
groupsArchive![](/images/permalink.svg)
Archive a property group
groupsUpdate![](/images/permalink.svg)
function groupsUpdate(string objectType, string groupName, PropertyGroupUpdate payload) returns PropertyGroup|error
Update a property group
Parameters
- objectType string - CRM object type
- groupName string - Group name
- payload PropertyGroupUpdate - Property group data to update
Return Type
- PropertyGroup|error - successful operation
propertyGetbyname![](/images/permalink.svg)
function propertyGetbyname(string objectType, string propertyName, boolean archived) returns Property|error
Read a property
Parameters
- objectType string - CRM object type
- propertyName string - Property name
- archived boolean (default false) - Whether to return only results that have been archived.
propertyArchive![](/images/permalink.svg)
Archive a property
propertyUpdate![](/images/permalink.svg)
function propertyUpdate(string objectType, string propertyName, PropertyUpdate payload) returns Property|error
Update a property
Parameters
- objectType string - CRM object type
- propertyName string - Property name
- payload PropertyUpdate - Property data to update
Records![](/images/permalink.svg)
hubspot.crm.property: BatchInputPropertyCreate![](/images/permalink.svg)
Fields
- inputs PropertyCreate[] -
hubspot.crm.property: BatchInputPropertyName![](/images/permalink.svg)
Fields
- inputs PropertyName[] -
hubspot.crm.property: BatchReadInputPropertyName![](/images/permalink.svg)
Fields
- inputs PropertyName[] -
- archived boolean - Whether the results that have been archived
hubspot.crm.property: BatchResponseProperty![](/images/permalink.svg)
Fields
- status string -
- results Property[] -
- numErrors int? -
- errors StandardError[]? -
- requestedAt string? -
- startedAt string -
- completedAt string -
- links record {}? -
hubspot.crm.property: ClientConfig![](/images/permalink.svg)
Provides a set of configurations for controlling the behaviours when communicating with a remote HTTP endpoint.
Fields
- auth BearerTokenConfig|OAuth2RefreshTokenGrantConfig - Configurations related to client authentication
- httpVersion string(default "1.1") - The HTTP version understood by the client
- http1Settings ClientHttp1Settings(default {}) - Configurations related to HTTP/1.x protocol
- http2Settings ClientHttp2Settings(default {}) - Configurations related to HTTP/2 protocol
- timeout decimal(default 60) - The maximum time to wait (in seconds) for a response before closing the connection
- forwarded string(default "disable") - The choice of setting
forwarded
/x-forwarded
header
- followRedirects FollowRedirects?(default ()) - Configurations associated with Redirection
- poolConfig PoolConfiguration?(default ()) - Configurations associated with request pooling
- cache CacheConfig(default {}) - HTTP caching related configurations
- compression Compression(default http:COMPRESSION_AUTO) - Specifies the way of handling compression (
accept-encoding
) header
- circuitBreaker CircuitBreakerConfig?(default ()) - Configurations associated with the behaviour of the Circuit Breaker
- retryConfig RetryConfig?(default ()) - Configurations associated with retrying
- cookieConfig CookieConfig?(default ()) - Configurations associated with cookies
- responseLimits ResponseLimitConfigs(default {}) - Configurations associated with inbound response size limits
- secureSocket ClientSecureSocket?(default ()) - SSL/TLS-related options
hubspot.crm.property: CollectionResponseProperty![](/images/permalink.svg)
Fields
- results Property[] -
- paging Paging? -
hubspot.crm.property: CollectionResponsePropertyGroup![](/images/permalink.svg)
Fields
- results PropertyGroup[] -
- paging Paging? -
hubspot.crm.property: Error![](/images/permalink.svg)
Fields
- message string - A human readable message describing the error along with remediation steps where appropriate
- correlationId string - A unique identifier for the request. Include this value with any error reports or support tickets
- category string - The error category
- subCategory string? - A specific category that contains more specific detail about the error
- errors ErrorDetail[]? - further information about the error
- context record {}? - Context about the error condition
- links record {}? - A map of link names to associated URIs containing documentation about the error or recommended remediation steps
hubspot.crm.property: ErrorCategory![](/images/permalink.svg)
Fields
- httpStatus string -
- name string -
hubspot.crm.property: ErrorDetail![](/images/permalink.svg)
Fields
- message string - A human readable message describing the error along with remediation steps where appropriate
- 'in string? - The name of the field or parameter in which the error was found.
- code string? - The status code associated with the error detail
- subCategory string? - A specific category that contains more specific detail about the error
- context record {}? - Context about the error condition
hubspot.crm.property: NextPage![](/images/permalink.svg)
Fields
- after string -
- link string? -
hubspot.crm.property: Option![](/images/permalink.svg)
Fields
- label string - A human-readable option label that will be shown in HubSpot.
- value string - The internal value of the option, which must be used when setting the property value through the API.
- description string? - A description of the option.
- displayOrder int? - Options are displayed in order starting with the lowest positive integer value. Values of -1 will cause the option to be displayed after any positive values.
- hidden boolean - Hidden options will not be displayed in HubSpot.
hubspot.crm.property: OptionInput![](/images/permalink.svg)
Fields
- label string - A human-readable option label that will be shown in HubSpot.
- value string - The internal value of the option, which must be used when setting the property value through the API.
- description string? - A description of the option.
- displayOrder int? - Options are shown in order starting with the lowest positive integer value. Values of -1 will cause the option to be displayed after any positive values.
- hidden boolean - Hidden options won't be shown in HubSpot.
hubspot.crm.property: Paging![](/images/permalink.svg)
Fields
- next NextPage? -
hubspot.crm.property: Property![](/images/permalink.svg)
Fields
- updatedAt string? -
- createdAt string? -
- archivedAt string? - When the property was archived.
- name string - The internal property name, which must be used when referencing the property via the API.
- label string - A human-readable property label that will be shown in HubSpot.
- 'type string - The property data type.
- fieldType string - Controls how the property appears in HubSpot.
- description string - A description of the property that will be shown as help text in HubSpot.
- groupName string - The name of the property group the property belongs to.
- options Option[] - A list of valid options for the property. This field is required for enumerated properties, but will be empty for other property types.
- createdUserId string? - The internal user ID of the user who created the property in HubSpot. This field may not exist if the property was created outside of HubSpot.
- updatedUserId string? - The internal user ID of the user who updated the property in HubSpot. This field may not exist if the property was updated outside of HubSpot.
- referencedObjectType string? - If this property is related to other object(s), they'll be listed here.
- displayOrder int? - Properties are shown in order, starting with the lowest positive integer value.
- calculated boolean? - For default properties, true indicates that the property is calculated by a HubSpot process. It has no effect for custom properties.
- externalOptions boolean? - For default properties, true indicates that the options are stored externally to the property settings.
- archived boolean? - Whether or not the property is archived.
- hasUniqueValue boolean? - Whether or not the property's value must be unique. Once set, this can't be changed.
- hidden boolean? - Whether or not the property will be hidden from the HubSpot UI. It's recommended this be set to false for custom properties.
- hubspotDefined boolean? - This will be true for default object properties built into HubSpot.
- showCurrencySymbol boolean? - Whether or not the property will display the currency symbol set in the account settings.
- modificationMetadata PropertyModificationMetadata? -
- formField boolean? - Whether or not the property can be used in a HubSpot form.
hubspot.crm.property: PropertyCreate![](/images/permalink.svg)
Fields
- name string - The internal property name, which must be used when referencing the property via the API.
- label string - A human-readable property label that will be shown in HubSpot.
- 'type string - The data type of the property.
- fieldType string - Controls how the property appears in HubSpot.
- groupName string - The name of the property group the property belongs to.
- description string? - A description of the property that will be shown as help text in HubSpot.
- options OptionInput[]? - A list of valid options for the property. This field is required for enumerated properties.
- displayOrder int? - Properties are displayed in order starting with the lowest positive integer value. Values of -1 will cause the property to be displayed after any positive values.
- hasUniqueValue boolean? - Whether or not the property's value must be unique. Once set, this can't be changed.
- hidden boolean? - If true, the property won't be visible and can't be used in HubSpot.
- formField boolean? - Whether or not the property can be used in a HubSpot form.
hubspot.crm.property: PropertyGroup![](/images/permalink.svg)
An ID for a group of properties
Fields
- name string - The internal property group name, which must be used when referencing the property group via the API.
- label string - A human-readable label that will be shown in HubSpot.
- displayOrder int - Property groups are displayed in order starting with the lowest positive integer value. Values of -1 will cause the property group to be displayed after any positive values.
- archived boolean - Archive ID
hubspot.crm.property: PropertyGroupCreate![](/images/permalink.svg)
Fields
- name string - The internal property group name, which must be used when referencing the property group via the API.
- label string - A human-readable label that will be shown in HubSpot.
- displayOrder int? - Property groups are displayed in order starting with the lowest positive integer value. Values of -1 will cause the property group to be displayed after any positive values.
hubspot.crm.property: PropertyGroupUpdate![](/images/permalink.svg)
Fields
- label string? - A human-readable label that will be shown in HubSpot.
- displayOrder int? - Property groups are displayed in order starting with the lowest positive integer value. Values of -1 will cause the property group to be displayed after any positive values.
hubspot.crm.property: PropertyModificationMetadata![](/images/permalink.svg)
Fields
- archivable boolean -
- readOnlyDefinition boolean -
- readOnlyOptions boolean? -
- readOnlyValue boolean -
hubspot.crm.property: PropertyName![](/images/permalink.svg)
Fields
- name string - The name of the property to read or modify.
hubspot.crm.property: PropertyUpdate![](/images/permalink.svg)
Fields
- label string? - A human-readable property label that will be shown in HubSpot.
- 'type string? - The data type of the property.
- fieldType string? - Controls how the property appears in HubSpot.
- groupName string? - The name of the property group the property belongs to.
- description string? - A description of the property that will be shown as help text in HubSpot.
- options OptionInput[]? - A list of valid options for the property.
- displayOrder int? - Properties are displayed in order starting with the lowest positive integer value. Values of -1 will cause the Property to be displayed after any positive values.
- hidden boolean? - If true, the property won't be visible and can't be used in HubSpot.
- formField boolean? - Whether or not the property can be used in a HubSpot form.
hubspot.crm.property: StandardError![](/images/permalink.svg)
Fields
- status string -
- id string? -
- category ErrorCategory -
- subCategory record {}? -
- message string -
- errors ErrorDetail[] -
- context record {} -
- links record {} -
Import
import ballerinax/hubspot.crm.property;
Metadata
Released date: over 2 years ago
Version: 2.0.0
License: Apache-2.0
Compatibility
Platform: any
Ballerina version: 2201.0.2
GraalVM compatible: Yes
Pull count
Total: 0
Current verison: 0
Weekly downloads
Keywords
Sales & CRM/Customer Relationship Management
Cost/Freemium
Contributors
Dependencies