hubspot.crm.schema
Module hubspot.crm.schema
API
![](https://bcentral-packageicons.azureedge.net/images/ballerinax_hubspot.crm.schema_1.2.0.png)
ballerinax/hubspot.crm.schema Ballerina library
Overview
This is a generated connector from HubSpot OpenAPI specification.
The CRM uses schemas to define how custom objects should store and represent information in the HubSpot CRM. Schemas define details about an object''s type, properties, and associations. The schema can be uniquely identified by its object type ID.
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>
Clients![](/images/permalink.svg)
hubspot.crm.schema: Client![](/images/permalink.svg)
This is a generated connector from HubSpot OpenAPI specification. The CRM uses schemas to define how custom objects should store and represent information in the HubSpot CRM. Schemas define details about an object's type, properties, and associations. The schema can be uniquely identified by its object type ID.
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(boolean archived) returns CollectionResponseObjectSchemaNoPaging|error
Get all schemas
Parameters
- archived boolean (default false) - Whether to return only results that have been archived.
Return Type
- CollectionResponseObjectSchemaNoPaging|error - successful operation
create![](/images/permalink.svg)
function create(ObjectSchemaEgg payload) returns ObjectSchema|error
Create a new schema
Parameters
- payload ObjectSchemaEgg - Object schema definition, including properties and associations.
Return Type
- ObjectSchema|error - successful operation
getById![](/images/permalink.svg)
function getById(string objectType) returns ObjectSchema|error
Get an existing schema
Parameters
- objectType string - Fully qualified name or object type ID of your schema.
Return Type
- ObjectSchema|error - successful operation
archive![](/images/permalink.svg)
Delete a schema
Parameters
- objectType string - Fully qualified name or object type ID of your schema.
- archived boolean (default false) - Whether to return only results that have been archived.
update![](/images/permalink.svg)
function update(string objectType, ObjectTypeDefinitionPatch payload) returns ObjectTypeDefinition|error
Update a schema
Parameters
- objectType string - Fully qualified name or object type ID of your schema.
- payload ObjectTypeDefinitionPatch - Attributes to update in your schema.
Return Type
- ObjectTypeDefinition|error - successful operation
associationsCreateassociation![](/images/permalink.svg)
function associationsCreateassociation(string objectType, AssociationDefinitionEgg payload) returns AssociationDefinition|error
Create an association
Parameters
- objectType string - Fully qualified name or object type ID of your schema.
- payload AssociationDefinitionEgg - Attributes that define the association.
Return Type
- AssociationDefinition|error - successful operation
associationsArchiveassociation![](/images/permalink.svg)
function associationsArchiveassociation(string objectType, string associationIdentifier) returns Response|error
Remove an association
Parameters
- objectType string - Fully qualified name or object type ID of your schema.
- associationIdentifier string - Unique ID of the association to remove.
purge![](/images/permalink.svg)
Purge schemas
Parameters
- objectType string - Fully qualified name or object type ID of your schema.
Records![](/images/permalink.svg)
hubspot.crm.schema: AssociationDefinition![](/images/permalink.svg)
Defines an association between two object types.
Fields
- fromObjectTypeId string - ID of the primary object type to link from.
- toObjectTypeId string - ID of the target object type ID to link to.
- name string? - A unique name for this association.
- id string - A unique ID for this association.
- createdAt string? - When the association was defined.
- updatedAt string? - When the association was last updated.
hubspot.crm.schema: AssociationDefinitionEgg![](/images/permalink.svg)
Defines an association between two object types.
Fields
- fromObjectTypeId string - ID of the primary object type to link from.
- toObjectTypeId string - ID of the target object type ID to link to.
- name string? - A unique name for this association.
hubspot.crm.schema: 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.schema: CollectionResponseObjectSchemaNoPaging![](/images/permalink.svg)
Fields
- results ObjectSchema[] -
hubspot.crm.schema: 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.schema: 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.schema: ObjectSchema![](/images/permalink.svg)
Defines an object schema, including its properties and associations.
Fields
- labels ObjectTypeDefinitionLabels - Singular and plural labels for the object. Used in CRM display.
- requiredProperties string[] - The names of properties that should be required when creating an object of this type.
- searchableProperties string[] - Names of properties that will be indexed for this object type in by HubSpot's product search.
- primaryDisplayProperty string? - The name of the primary property for this object. This will be displayed as primary on the HubSpot record page for this object type.
- secondaryDisplayProperties string[] - The names of secondary properties for this object. These will be displayed as secondary on the HubSpot record page for this object type.
- archived boolean - Is object archived
- id string - A unique ID for this schema's object type. Will be defined as {meta-type}-{unique ID}.
- fullyQualifiedName string - An assigned unique ID for the object, including portal ID and object name.
- createdAt string? - When the object schema was created.
- updatedAt string? - When the object schema was last updated.
- objectTypeId string - Object type ID
- properties Property[] - Properties defined for this object type.
- associations AssociationDefinition[] - Associations defined for a given object type.
- name string - A unique name for the schema's object type.
hubspot.crm.schema: ObjectSchemaEgg![](/images/permalink.svg)
Defines a new object type, its properties, and associations.
Fields
- labels ObjectTypeDefinitionLabels - Singular and plural labels for the object. Used in CRM display.
- requiredProperties string[] - The names of properties that should be required when creating an object of this type.
- searchableProperties string[] - Names of properties that will be indexed for this object type in by HubSpot's product search.
- primaryDisplayProperty string? - The name of the primary property for this object. This will be displayed as primary on the HubSpot record page for this object type.
- secondaryDisplayProperties string[] - The names of secondary properties for this object. These will be displayed as secondary on the HubSpot record page for this object type.
- properties ObjectTypePropertyCreate[] - Properties defined for this object type.
- associatedObjects string[] - Associations defined for this object type.
- name string - A unique name for this object. For internal use only.
hubspot.crm.schema: ObjectTypeDefinition![](/images/permalink.svg)
Defines an object type.
Fields
- labels ObjectTypeDefinitionLabels - Singular and plural labels for the object. Used in CRM display.
- requiredProperties string[] - The names of properties that should be required when creating an object of this type.
- searchableProperties string[] - Names of properties that will be indexed for this object type in by HubSpot's product search.
- primaryDisplayProperty string? - The name of the primary property for this object. This will be displayed as primary on the HubSpot record page for this object type.
- secondaryDisplayProperties string[] - The names of secondary properties for this object. These will be displayed as secondary on the HubSpot record page for this object type.
- archived boolean - Is object archived
- id string - A unique ID for this object type. Will be defined as {meta-type}-{unique ID}.
- fullyQualifiedName string - Fully qualified name
- createdAt string? - When the object type was created.
- updatedAt string? - When the object type was last updated.
- objectTypeId string - Object type ID
- name string - A unique name for this object. For internal use only.
- portalId int? - The ID of the account that this object type is specific to.
hubspot.crm.schema: ObjectTypeDefinitionLabels![](/images/permalink.svg)
Singular and plural labels for the object. Used in CRM display.
Fields
- singular string? - The word for one object. (There’s no way to change this later.)
- plural string? - The word for multiple objects. (There’s no way to change this later.)
hubspot.crm.schema: ObjectTypeDefinitionPatch![](/images/permalink.svg)
Defines attributes to update on an object type.
Fields
- labels ObjectTypeDefinitionLabels? - Singular and plural labels for the object. Used in CRM display.
- requiredProperties string[]? - The names of properties that should be required when creating an object of this type.
- searchableProperties string[]? - Names of properties that will be indexed for this object type in by HubSpot's product search.
- primaryDisplayProperty string? - The name of the primary property for this object. This will be displayed as primary on the HubSpot record page for this object type.
- secondaryDisplayProperties string[]? - The names of secondary properties for this object. These will be displayed as secondary on the HubSpot record page for this object type.
- restorable boolean? - Is restorable
hubspot.crm.schema: ObjectTypePropertyCreate![](/images/permalink.svg)
Defines a property to create.
Fields
- name string - The internal property name, which must be used when referencing the property from the API.
- label string - A human-readable property label that will be shown in HubSpot.
- groupName string? - The name of the group this property belongs to.
- description string? - A description of the property that will be shown as help text in HubSpot.
- options OptionInput[]? - A list of available options for the property. This field is only required for enumerated properties.
- displayOrder int? - The order that this property should be displayed in the HubSpot UI relative to other properties for this object type. Properties are displayed in order starting with the lowest positive integer value. A value 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? - Is property hidden
- 'type string - The data type of the property.
- fieldType string - Controls how the property appears in HubSpot.
hubspot.crm.schema: Option![](/images/permalink.svg)
The options available when a property is an enumeration
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.schema: OptionInput![](/images/permalink.svg)
Defines a enumeration property option
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.schema: Property![](/images/permalink.svg)
Defines a property
Fields
- updatedAt string? - When the property was updated
- createdAt string? - When the property was created
- 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 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? - The order that this property should be displayed in the HubSpot UI relative to other properties for this object type. Properties are displayed in order starting with the lowest positive integer value. A value of -1 will cause the property to be displayed after any positive values.
- 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? - If schema is hidden
- hubspotDefined boolean? - This will be true for default object properties built into HubSpot.
- showCurrencySymbol boolean? - Whether the property will display the currency symbol set in the account settings.
- modificationMetadata PropertyModificationMetadata? - Modification metadata
- formField boolean? - Whether or not the property can be used in a HubSpot form.
hubspot.crm.schema: PropertyModificationMetadata![](/images/permalink.svg)
Modification metadata
Fields
- archivable boolean - The schema is archivable
- readOnlyDefinition boolean - The schema has readonly definition
- readOnlyOptions boolean? - The schema has readonly options
- readOnlyValue boolean - The shema has readonly value
Import
import ballerinax/hubspot.crm.schema;
Metadata
Released date: over 2 years ago
Version: 1.2.0
License: Apache-2.0
Compatibility
Platform: any
Ballerina version: 2201.0.0
GraalVM compatible: Yes
Pull count
Total: 0
Current verison: 0
Weekly downloads
Keywords
Sales & CRM/Customer Relationship Management
Cost/Freemium
Contributors
Dependencies