HubSpot: Contracts schemas
22 HubSpot schemas with complete fields and constraints.
← Contracts operations · All schemas
List associations — contracts get Associations By To Object Type — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a paginated collection of objects that are associated with multiple labels, including the results and pagination details. This component is used when retrieving associated objects with specific labels in a forward-paging manner. |
paging | Model | Optional | Expand List — contracts get Contracts — response body — paging |
results | array | Required within parent | An array of multi-associated objects, each containing details about the associations and their labels. |
results[] | Model | Each item | Expand List associations — contracts get Associations By To Object Type — response body — results item |
Referenced models: List — contracts get Contracts — response body — paging, List associations — contracts get Associations By To Object Type — response body — results item
List associations — contracts get Associations By To Object Type — response body — results item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents an object that is associated with multiple other objects, with optional context. |
associationTypes | array | Required within parent | An array of association specifications with labels, detailing the types of associations between the objects. Each item in the array is an object that includes information about the association category, type ID, and optional label. |
associationTypes[] | Model | Each item | Expand List associations — contracts get Associations By To Object Type — response body — results item association Types item |
toObjectId | string | Required within parent | The unique identifier of the object that is being associated. It is a string that represents the target object in the association. |
Referenced models: List associations — contracts get Associations By To Object Type — response body — results item association Types item
List associations — contracts get Associations By To Object Type — response body — results item association Types item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Defines the type, direction, and details of the relationship between two CRM objects. |
category | string | Required within parent | The category of the association, which can be 'HUBSPOT_DEFINED', 'USER_DEFINED', 'INTEGRATOR_DEFINED', or 'WORK'. Known values: HUBSPOT_DEFINED, INTEGRATOR_DEFINED, USER_DEFINED, WORK |
fromObjectTypeId | string | Optional | A string representing the object type ID from which the association originates. |
label | string | Optional | A string representing the label for the association, providing a human-readable description. |
toObjectTypeId | string | Optional | A string representing the object type ID to which the association points. |
typeId | JSON | Required within parent | |
typeId (anyOf 1) | integer | Alternative | An integer representing the unique identifier for the association type. Format: int32 |
typeId (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
List — contracts get Contracts — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a paginated collection response that includes simple public objects with their associations. This component is used to handle the results and pagination details when retrieving a list of objects from the API. |
paging | Model | Optional | Expand List — contracts get Contracts — response body — paging |
results | array | Required within parent | An array of SimplePublicObjectWithAssociations, each representing a CRM object and its associated data. |
results[] | Model | Each item | Expand Read — contracts get Contract — response body |
Referenced models: List — contracts get Contracts — response body — paging, Read — contracts get Contract — response body
List — contracts get Contracts — response body — paging
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Paging information for forward-only pagination. Contains the next page reference when more results are available; omitted or empty on the last page. |
next | Model | Optional | Expand List — contracts get Contracts — response body — paging next |
Referenced models: List — contracts get Contracts — response body — paging next
List — contracts get Contracts — response body — paging next
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Specifies the paging information needed to retrieve the next set of results in a paginated API response |
after | string | Required within parent | A string token that indicates the position after the last item in the current page of results. This token is used to fetch the next page. |
link | string | Optional | A URL string that provides a direct link to the next page of results. |
Read a batch of contracts by internal ID, or unique property values — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Specifies the input for reading a batch of CRM objects, including arrays of object IDs, requested property names (with optional history), and an optional unique identifying property. |
idProperty | string | Optional | When using a custom unique value property to retrieve records, the name of the property. Do not include this parameter if retrieving by record ID. |
inputs | array | Required within parent | An array of SimplePublicObjectId objects, each containing the ID of an object to be read. |
inputs[] | Model | Each item | Expand Batch archive price book items — request body — body inputs item |
properties | array | Required within parent | An array of strings representing the names of the properties to be returned for each object. |
properties[] | string | Each item | |
propertiesWithHistory | array | Required within parent | An array of strings representing the names of the properties to be returned along with their history of previous values for each object. |
propertiesWithHistory[] | string | Each item |
Referenced models: Batch archive price book items — request body — body inputs item
Read a batch of contracts by internal ID, or unique property values — response body — status: CANCELED, COMPLETE, PENDING, PROCESSING errors item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a standard error response in the HubSpot API, providing detailed information about an error that occurred during an API request. |
category | string | Required within parent | A string that categorizes the error. |
context | object | Required within parent | An object containing additional context about the error, with each key mapping to an array of strings. Additional keys: see wildcard field |
context.* | array | Additional keys | |
context.*[] | string | Each item | |
errors | array | Required within parent | An array of ErrorDetail objects that provide further information about the error. |
errors[] | Model | Each item | Expand Batch insert events — response body — errors item errors item |
id | string | Optional | A string representing the unique identifier for the error. |
links | object | Required within parent | An object mapping link names to associated URIs that contain documentation about the error or recommended remediation steps. Additional keys: see wildcard field |
links.* | string | Additional keys | |
message | string | Required within parent | A string containing a human-readable message describing the error. |
status | string | Required within parent | A string indicating the status of the error. |
subCategory | object | Optional | An object providing more specific categorization of the error. |
Referenced models: Batch insert events — response body — errors item errors item
Read a batch of contracts by internal ID, or unique property values — response body — status: CANCELED, COMPLETE, PENDING, PROCESSING — Contracts Batch Response Simple Public Object
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A public object batch response object |
completedAt | string | Required within parent | The date and time when the batch operation was completed, in ISO 8601 format. Format: date-time |
links | object | Optional | A map of link names to associated URIs providing additional information about the batch operation. Additional keys: see wildcard field |
links.* | string | Additional keys | |
requestedAt | string | Optional | The date and time when the batch operation was requested, in ISO 8601 format. Format: date-time |
results | array | Required within parent | An array of simple public objects that were processed in the batch operation. |
results[] | Model | Each item | Expand Search for contracts using specified criteria — response body — results item |
startedAt | string | Required within parent | The date and time when the batch operation started, in ISO 8601 format. Format: date-time |
status | string | Required within parent | The current status of the batch operation. Valid values include 'PENDING', 'PROCESSING', 'CANCELED', and 'COMPLETE'. Known values: CANCELED, COMPLETE, PENDING, PROCESSING |
Referenced models: Search for contracts using specified criteria — response body — results item
Read a batch of contracts by internal ID, or unique property values — response body — status: CANCELED, COMPLETE, PENDING, PROCESSING — Contracts Batch Response Simple Public Object With Errors
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents the result of a batch operation on CRM objects, including the processing status, batch results, timestamps, and a list of any errors encountered during the operation. |
completedAt | string | Required within parent | The date and time when the batch operation was completed, in ISO 8601 format. Format: date-time |
errors | array | Optional | An array of StandardError objects detailing any errors that occurred during the batch operation. |
errors[] | Model | Each item | Expand Read a batch of contracts by internal ID, or unique property values — response body — status: CANCELED, COMPLETE, PENDING, PROCESSING errors item |
links | object | Optional | A map of link names to associated URIs, providing additional information or actions related to the batch operation. Additional keys: see wildcard field |
links.* | string | Additional keys | |
numErrors | JSON | Optional | |
numErrors (anyOf 1) | integer | Alternative | The number of errors that occurred during the batch operation. Format: int32 |
numErrors (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
requestedAt | string | Optional | The date and time when the batch operation was requested, in ISO 8601 format. Format: date-time |
results | array | Required within parent | An array of SimplePublicObject items that represent the results of the batch operation. |
results[] | Model | Each item | Expand Search for contracts using specified criteria — response body — results item |
startedAt | string | Required within parent | The date and time when the batch operation started, in ISO 8601 format. Format: date-time |
status | string | Required within parent | The current status of the batch operation. Valid values include 'PENDING', 'PROCESSING', 'CANCELED', and 'COMPLETE'. Known values: CANCELED, COMPLETE, PENDING, PROCESSING |
Referenced models: Read a batch of contracts by internal ID, or unique property values — response body — status: CANCELED, COMPLETE, PENDING, PROCESSING errors item, Search for contracts using specified criteria — response body — results item
Read — contracts get Contract — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a CRM object along with its properties, timestamps, and a set of associated object IDs grouped by association type. |
archived | boolean | Required within parent | A boolean indicating whether this object has been archived. |
archivedAt | string | Optional | The date and time when this object was archived, in ISO 8601 format. Format: date-time |
associations | object | Optional | A map of associated object types to their respective collection of associated IDs. Additional keys: see wildcard field |
associations.* | Model | Additional keys | Expand Read — contracts get Contract — response body — associations value |
createdAt | string | Required within parent | The date and time when this object was created, in ISO 8601 format. Format: date-time |
id | string | Required within parent | The unique identifier for this object. |
objectWriteTraceId | string | Optional | An identifier used for tracing the write operations on this object. |
properties | object | Required within parent | A map of property names to their current values for the object. Additional keys: see wildcard field |
properties.* | string | Additional keys | |
propertiesWithHistory | object | Optional | A map of property names to their values along with a history of changes, represented as arrays of values with timestamps. Additional keys: see wildcard field |
propertiesWithHistory.* | array | Additional keys | |
propertiesWithHistory.*[] | Model | Each item | Expand Read — contracts get Contract — response body — properties With History value item |
updatedAt | string | Required within parent | The date and time when this object was last updated, in ISO 8601 format. Format: date-time |
url | string | Optional | The URL link to access this object. |
warnings | array | Optional | An array of warnings related to the object, each containing a category, message, and context. |
warnings[] | Model | Each item | Expand Read — contracts get Contract — response body — warnings item |
Referenced models: Read — contracts get Contract — response body — associations value, Read — contracts get Contract — response body — warnings item, Read — contracts get Contract — response body — properties With History value item
Read — contracts get Contract — response body — associations value
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a collection of associated IDs returned by an API request, including pagination details for navigating through the results. |
paging | Model | Optional | Expand Search for contracts using specified criteria — response body — paging |
results | array | Required within parent | An array of associated IDs, each represented by an AssociatedId object. This property is required. |
results[] | Model | Each item | Expand Read — contracts get Contract — response body — associations value results item |
Referenced models: Read — contracts get Contract — response body — associations value results item, Search for contracts using specified criteria — response body — paging
Read — contracts get Contract — response body — associations value results item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Contains the id and type of an association |
id | string | Required within parent | The unique identifier for the associated object. It is a string. |
type | string | Required within parent | The type of the association. It is a string. |
Read — contracts get Contract — response body — properties With History value item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Property model that includes timestamp. |
sourceId | string | Optional | A string representing the unique identifier of the source. |
sourceLabel | string | Optional | A string label describing the source. |
sourceType | string | Required within parent | A string indicating the type of source from which the value was obtained. |
timestamp | string | Required within parent | The date and time when the value was recorded, in ISO 8601 format. Format: date-time |
updatedByUserId | JSON | Optional | |
updatedByUserId (anyOf 1) | integer | Alternative | The ID of the user who last updated the value, represented as an integer. Format: int32 |
updatedByUserId (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
value | string | Required within parent | The actual value recorded at the given timestamp. It is a string. |
Read — contracts get Contract — response body — warnings item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a warning message related to a public object in HubSpot, providing details about the nature and context of the warning. |
category | string | Required within parent | A string representing the category of the warning. |
context | object | Required within parent | An object containing additional context about the warning, with string values for each context key. Additional keys: see wildcard field |
context.* | string | Additional keys | |
message | string | Required within parent | A string containing the warning message. |
Search for contracts using specified criteria — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Describes a search request |
after | string | Required within parent | A string representing the paging cursor token. This is used to fetch the next set of results in a paginated response. |
filterGroups | array | Required within parent | An array of filter groups used to narrow down the search results. Each filter group can contain multiple filters that define specific criteria. |
filterGroups[] | Model | Each item | Expand Search for contracts using specified criteria — request body — body filter Groups item |
limit | integer | Required within parent | An integer specifying the maximum number of results to return. This helps control the size of the result set. Format: int32 |
properties | array | Required within parent | An array of strings indicating which properties of the CRM objects should be returned in the search results. |
properties[] | string | Each item | |
query | string | Optional | A string used to perform a full-text search across the CRM objects. |
sorts | array | Required within parent | An array of strings specifying the sort order of the search results. Each string represents a property to sort by, optionally prefixed with a '-' to indicate descending order. |
sorts[] | string | Each item |
Referenced models: Search for contracts using specified criteria — request body — body filter Groups item
Search for contracts using specified criteria — request body — body filter Groups item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a group of filters used to query data within HubSpot. This component is used to define criteria for filtering records in various API endpoints. |
filters | array | Required within parent | An array of Filter objects that define the criteria for filtering search results. Each filter specifies a property, an operator, and a value or range of values to match. |
filters[] | Model | Each item | Expand Search for contracts using specified criteria — request body — body filter Groups item filters item |
Referenced models: Search for contracts using specified criteria — request body — body filter Groups item filters item
Search for contracts using specified criteria — request body — body filter Groups item filters item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Defines a single condition for searching CRM objects, specifying the property to filter on, the operator to use (such as equals, greater than, or contains), and the value(s) to compare against. |
highValue | string | Optional | A string representing the upper bound value for range-based filter operations. It is used with operators like 'BETWEEN'. |
operator | string | Required within parent | The operator defines the type of comparison to be made between the property and the value(s). It is a string and valid operators include 'EQ', 'NEQ', 'LT', 'LTE', 'GT', 'GTE', 'BETWEEN', 'IN', 'NOT_IN', 'HAS_PROPERTY', 'NOT_HAS_PROPERTY', 'CONTAINS_TOKEN', and 'NOT_CONTAINS_TOKEN'. One of: BETWEEN, CONTAINS_TOKEN, EQ, GT, GTE, HAS_PROPERTY, IN, LT, LTE, NEQ, NOT_CONTAINS_TOKEN, NOT_HAS_PROPERTY, NOT_IN |
propertyName | string | Required within parent | The name of the property on which the filter is applied. It is a string that identifies the specific field in the CRM object. |
value | string | Optional | A string representing the value to be used in the filter operation. This is used in conjunction with the operator to determine matching records. |
values | array | Optional | An array of strings representing multiple values for the filter operation. This is used with operators like 'IN' and 'NOT_IN' to match any of the specified values. |
values[] | string | Each item |
Search for contracts using specified criteria — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a list of simple objects returned from an API request, along with the total count of objects available. |
paging | Model | Optional | Expand Search for contracts using specified criteria — response body — paging |
results | array | Required within parent | An array containing the simple public objects returned in the current response. |
results[] | Model | Each item | Expand Search for contracts using specified criteria — response body — results item |
total | JSON | Required within parent | |
total (anyOf 1) | integer | Alternative | The number of available results Format: int32 |
total (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Referenced models: Search for contracts using specified criteria — response body — paging, Search for contracts using specified criteria — response body — results item
Search for contracts using specified criteria — response body — paging
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents the pagination information for navigating through a list of results in the API. It provides details on how to access the previous or next set of results. |
next | Model | Optional | Expand List — contracts get Contracts — response body — paging next |
prev | Model | Optional | Expand Search for contracts using specified criteria — response body — paging prev |
Referenced models: List — contracts get Contracts — response body — paging next, Search for contracts using specified criteria — response body — paging prev
Search for contracts using specified criteria — response body — paging prev
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | specifies the paging information needed to retrieve the previous set of results in a paginated API response |
before | string | Required within parent | A string token used as a cursor to identify the position before the current page of results. This token can be used to fetch the previous page. |
link | string | Optional | A string representing the URL link to the previous page of results. This provides a direct way to access the previous set of resources. |
Search for contracts using specified criteria — response body — results item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A simple public object. |
archived | boolean | Required within parent | A boolean indicating whether this object is archived. |
archivedAt | string | Optional | The date and time when this object was archived, in ISO 8601 format. Format: date-time |
createdAt | string | Required within parent | The date and time when this object was created, in ISO 8601 format. Format: date-time |
id | string | Required within parent | The unique identifier for this object, represented as a string. |
objectWriteTraceId | string | Optional | A string representing the trace ID for write operations on this object. |
properties | object | Required within parent | A map of property names to their values, where each property is represented as a string. Additional keys: see wildcard field |
properties.* | string | Additional keys | |
propertiesWithHistory | object | Optional | A map of property names to their historical values, where each value is an array of objects containing the value and timestamp. Additional keys: see wildcard field |
propertiesWithHistory.* | array | Additional keys | |
propertiesWithHistory.*[] | Model | Each item | Expand Read — contracts get Contract — response body — properties With History value item |
updatedAt | string | Required within parent | The date and time when this object was last updated, in ISO 8601 format. Format: date-time |
url | string | Optional | A string representing the URL of this object. |
warnings | array | Optional | An array of warnings related to this object, where each warning contains a category, message, and context. |
warnings[] | Model | Each item | Expand Read — contracts get Contract — response body — warnings item |
Referenced models: Read — contracts get Contract — response body — warnings item, Read — contracts get Contract — response body — properties With History value item