hubspot.crm.schema
Module hubspot.crm.schema
API
Definitions
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
hubspot.crm.schema: Client
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
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 (ConnectionConfig config, string serviceUrl)
- config ConnectionConfig - The configurations to be used when initializing the
connector
- serviceUrl string "https://api.hubapi.com" - URL of the target service
getAll
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
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
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
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
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 schema
Return Type
- ObjectTypeDefinition|error - successful operation
associationsCreateassociation
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
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
Purge schemas
Parameters
- objectType string - Fully qualified name or object type ID of your schema.
Records
hubspot.crm.schema: AssociationDefinition
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
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: ClientHttp1Settings
Provides settings related to HTTP/1.x protocol.
Fields
- keepAlive KeepAlive(default http:KEEPALIVE_AUTO) - Specifies whether to reuse a connection for multiple requests
- chunking Chunking(default http:CHUNKING_AUTO) - The chunking behaviour of the request
- proxy ProxyConfig? - Proxy server related options
hubspot.crm.schema: CollectionResponseObjectSchemaNoPaging
Fields
- results ObjectSchema[] -
hubspot.crm.schema: ConnectionConfig
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 HttpVersion(default http:HTTP_2_0) - The HTTP version understood by the client
- http1Settings ClientHttp1Settings? - Configurations related to HTTP/1.x protocol
- http2Settings ClientHttp2Settings? - 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
- poolConfig PoolConfiguration? - Configurations associated with request pooling
- cache CacheConfig? - HTTP caching related configurations
- compression Compression(default http:COMPRESSION_AUTO) - Specifies the way of handling compression (
accept-encoding
) header
- circuitBreaker CircuitBreakerConfig? - Configurations associated with the behaviour of the Circuit Breaker
- retryConfig RetryConfig? - Configurations associated with retrying
- responseLimits ResponseLimitConfigs? - Configurations associated with inbound response size limits
- secureSocket ClientSecureSocket? - SSL/TLS-related options
- proxy ProxyConfig? - Proxy server related options
- validation boolean(default true) - Enables the inbound payload validation functionality which provided by the constraint package. Enabled by default
hubspot.crm.schema: Error
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
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: OAuth2RefreshTokenGrantConfig
OAuth2 Refresh Token Grant Configs
Fields
- Fields Included from *OAuth2RefreshTokenGrantConfig
- refreshUrl string(default "https://api.hubapi.com/oauth/v1/token") - Refresh URL
hubspot.crm.schema: ObjectSchema
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
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
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
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
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
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
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
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
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
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
hubspot.crm.schema: ProxyConfig
Proxy server configurations to be used with the HTTP client endpoint.
Fields
- host string(default "") - Host name of the proxy server
- port int(default 0) - Proxy server port
- userName string(default "") - Proxy server username
- password string(default "") - Proxy server password
Import
import ballerinax/hubspot.crm.schema;
Metadata
Released date: over 1 year ago
Version: 2.3.1
License: Apache-2.0
Compatibility
Platform: any
Ballerina version: 2201.4.1
GraalVM compatible: Yes
Pull count
Total: 1
Current verison: 1
Weekly downloads
Keywords
Sales & CRM/Customer Relationship Management
Cost/Freemium
Contributors
Dependencies