hubspot.crm.commerce.discounts
Module hubspot.crm.commerce.discounts
API
Definitions
ballerinax/hubspot.crm.commerce.discounts Ballerina library
Overview
HubSpot is an AI-powered customer relationship management (CRM) platform.
The HubSpot connector offers APIs to connect and interact with the HubSpot Discounts API endpoints, specifically based on the HubSpot REST API.
Key Features
- Create, read, update, and delete discount records in HubSpot CRM
- Batch operations for bulk discount management
- Search discounts with filtering support
- Manage discount associations with other CRM objects
Setup guide
You need a HubSpot developer account with an app to use HubSpot connectors.
To create a HubSpot Developer account, click here
Step 1: Create HubSpot Developer Project
-
Login to HubSpot developer account.
-
Create a public app by clicking on "Create app".

-
Click on "Create app".

-
Under "App Info"
- Enter Public app name.
- Update App logo (optional).
- Update Description (optional).

Then move to "Auth" tab.
-
Setup the "Redirect URLs" with respective links.

Finally Create the app.
Step 2: Get Client ID and Client secret
Navigate to "Auth" tab.

Step 3: Get access token and refresh token
-
Set scopes under "Auth" tab for your app based on the API requirements.
.Enable scopes required for HubSpot CRM Discounts API.
crm.objects.line_items.readcrm.objects.line_items.writeoauth
-
Under "Auth" tab under Sample install URL (OAuth) section copy the full URL.
https://app.hubspot.com/oauth/authorize?client_id=<client_id>&redirect_uri=<redirect_url>&scope=<scopes> -
Choose the preferred account.

Choose account and authorize the client.
-
Check URL tab and find the authorization code.
-
Send a http request to the HubSpot.
-
Linux/MacOS
curl --request POST \ --url https://api.hubapi.com/oauth/v1/token \ --header 'content-type: application/x-www-form-urlencoded' \ --data 'grant_type=authorization_code&code=<code>&redirect_uri=http://localhost:9090&client_id=<client_id>&client_secret=<client_secret>'
-
-
Above command returns the access token and refresh token.
-
Use these tokens to authorize the client.
Quickstart
Follow the below steps to use the HubSpot CRM Commerce Discounts connector in your Ballerina application.
Step 1: Import the module
Import the hubspot.crm.commerce.discounts module and oauth2 module.
import ballerina/oauth2; import ballerinax/hubspot.crm.commerce.discounts;
Step 2: Instantiate a new connector
-
Instantiate a
OAuth2RefreshTokenGrantConfigwith the obtained credentials and initialize the connector with it.configurable string clientId = ?; configurable string clientSecret = ?; configurable string refreshToken = ?; ConnectionConfig config = { auth: { clientId, clientSecret, refreshToken, credentialBearer: oauth2:POST_BODY_BEARER } }; final Client hubSpotClient = check new (config); -
Create a
Config.tomlfile inside the Ballerina package and add the following configurations with the values retrieved in the earlier steps.clientId = <Client Id> clientSecret = <Client Secret> refreshToken = <Refresh Token>
Step 3: Invoke the connector operation
Now, utilize the available connector operations. A sample use case is shown below.
Create a New Discount
SimplePublicObjectInputForCreate payload = { associations: [], objectWriteTraceId: "1234", properties: { "hs_label": "test_discount", "hs_duration": "ONCE", "hs_type": "PERCENT", "hs_value": "40", "hs_sort_order": "2" } }; SimplePublicObject createResponse = check hubspotClient->/.post(payload);
List all discounts
GetCrmV3ObjectsDiscountsQueries params = { 'limit: 10, archived: false, properties: ["hs_label", "hs_value", "hs_type"] }; CollectionResponseSimplePublicObjectWithAssociationsForwardPaging response = check hubspotClient->/.get(queries=params);
Examples
The HubSpot CRM Commerce Discounts connector provides practical examples illustrating usage in various scenarios. Explore these examples, covering the following use cases:
- Discount Manager - see how the HubSpot API can be used to create discount and manage it through endpoints.
- Festival Discounts - see how the HubSpot API can be used to create and to manage multiple discounts at a time.
Clients
hubspot.crm.commerce.discounts: Client
Constructor
Gets invoked to initialize the connector.
init (ConnectionConfig config, string serviceUrl)- config ConnectionConfig - The configurations to be used when initializing the
connector
- serviceUrl string "https://api.hubapi.com/crm/v3/objects/discounts" - URL of the target service
post batch/read
function post batch/read(BatchReadInputSimplePublicObjectId payload, map<string|string[]> headers, *PostCrmV3ObjectsDiscountsBatchReadQueries queries) returns BatchResponseSimplePublicObject|BatchResponseSimplePublicObjectWithErrors|errorRead a batch of discounts
Parameters
- payload BatchReadInputSimplePublicObjectId -
- queries *PostCrmV3ObjectsDiscountsBatchReadQueries - Queries to be sent with the request
Return Type
- BatchResponseSimplePublicObject|BatchResponseSimplePublicObjectWithErrors|error - successful operation
get [string discountId]
function get [string discountId](map<string|string[]> headers, *GetCrmV3ObjectsDiscountsDiscountIdQueries queries) returns SimplePublicObjectWithAssociations|errorRetrieve a discount by ID
Parameters
- queries *GetCrmV3ObjectsDiscountsDiscountIdQueries - Queries to be sent with the request
Return Type
- SimplePublicObjectWithAssociations|error - successful operation
delete [string discountId]
Archive a discount by ID
Return Type
- error? - No content
patch [string discountId]
function patch [string discountId](SimplePublicObjectInput payload, map<string|string[]> headers, *PatchCrmV3ObjectsDiscountsDiscountIdQueries queries) returns SimplePublicObject|errorUpdate a discount by ID
Parameters
- payload SimplePublicObjectInput -
- queries *PatchCrmV3ObjectsDiscountsDiscountIdQueries - Queries to be sent with the request
Return Type
- SimplePublicObject|error - successful operation
post batch/archive
function post batch/archive(BatchInputSimplePublicObjectId payload, map<string|string[]> headers) returns error?Archive a batch of discounts by ID
Parameters
- payload BatchInputSimplePublicObjectId -
Return Type
- error? - No content
post batch/create
function post batch/create(BatchInputSimplePublicObjectInputForCreate payload, map<string|string[]> headers) returns BatchResponseSimplePublicObject|BatchResponseSimplePublicObjectWithErrors|errorCreate a batch of discounts
Parameters
Return Type
- BatchResponseSimplePublicObject|BatchResponseSimplePublicObjectWithErrors|error - successful operation
post batch/update
function post batch/update(BatchInputSimplePublicObjectBatchInput payload, map<string|string[]> headers) returns BatchResponseSimplePublicObject|BatchResponseSimplePublicObjectWithErrors|errorUpdate a batch of discounts
Parameters
- payload BatchInputSimplePublicObjectBatchInput -
Return Type
- BatchResponseSimplePublicObject|BatchResponseSimplePublicObjectWithErrors|error - successful operation
get .
function get .(map<string|string[]> headers, *GetCrmV3ObjectsDiscountsQueries queries) returns CollectionResponseSimplePublicObjectWithAssociationsForwardPaging|errorList all discounts
Parameters
- queries *GetCrmV3ObjectsDiscountsQueries - Queries to be sent with the request
Return Type
- CollectionResponseSimplePublicObjectWithAssociationsForwardPaging|error - successful operation
post .
function post .(SimplePublicObjectInputForCreate payload, map<string|string[]> headers) returns SimplePublicObject|errorCreate a discount
Parameters
- payload SimplePublicObjectInputForCreate -
Return Type
- SimplePublicObject|error - successful operation
post batch/upsert
function post batch/upsert(BatchInputSimplePublicObjectBatchInputUpsert payload, map<string|string[]> headers) returns BatchResponseSimplePublicUpsertObject|BatchResponseSimplePublicUpsertObjectWithErrors|errorUpsert a batch of discounts
Parameters
Return Type
- BatchResponseSimplePublicUpsertObject|BatchResponseSimplePublicUpsertObjectWithErrors|error - successful operation
post search
function post search(PublicObjectSearchRequest payload, map<string|string[]> headers) returns CollectionResponseWithTotalSimplePublicObjectForwardPaging|errorSearch discounts
Parameters
- payload PublicObjectSearchRequest -
Return Type
- CollectionResponseWithTotalSimplePublicObjectForwardPaging|error - successful operation
Records
hubspot.crm.commerce.discounts: ApiKeysConfig
Provides API key configurations needed when communicating with a remote HTTP endpoint.
Fields
- privateAppLegacy string -
- privateApp string -
hubspot.crm.commerce.discounts: AssociatedId
Represents an associated object's ID and association type.
Fields
- id string - The unique identifier of the associated object.
- 'type string - The type of association between the objects.
hubspot.crm.commerce.discounts: AssociationSpec
Defines the category and type of an association between objects.
Fields
- associationCategory "HUBSPOT_DEFINED"|"USER_DEFINED"|"INTEGRATOR_DEFINED" - Category of the association: HubSpot-defined, user-defined, or integrator-defined.
- associationTypeId Signed32 - Numeric identifier for the specific association type.
hubspot.crm.commerce.discounts: BatchInputSimplePublicObjectBatchInput
A batch input wrapper containing an array of objects to update in bulk.
Fields
- inputs SimplePublicObjectBatchInput[] - An array of objects to be updated in the batch operation.
hubspot.crm.commerce.discounts: BatchInputSimplePublicObjectBatchInputUpsert
Input schema for a batch upsert operation containing discount objects to create or update.
Fields
- inputs SimplePublicObjectBatchInputUpsert[] - Array of discount objects to upsert in batch.
hubspot.crm.commerce.discounts: BatchInputSimplePublicObjectId
Input schema for a batch operation containing a list of object IDs to process.
Fields
- inputs SimplePublicObjectId[] - Array of object IDs to process in the batch operation.
hubspot.crm.commerce.discounts: BatchInputSimplePublicObjectInputForCreate
A batch input wrapper containing an array of objects to create in bulk.
Fields
- inputs SimplePublicObjectInputForCreate[] - An array of objects to be created in the batch operation.
hubspot.crm.commerce.discounts: BatchReadInputSimplePublicObjectId
Input schema for reading a batch of discounts by their IDs.
Fields
- propertiesWithHistory string[] - List of properties to return along with their historical values.
- idProperty? string - The property name used as the unique identifier for lookups.
- inputs SimplePublicObjectId[] - Array of object IDs to retrieve in the batch request.
- properties string[] - List of property names to include in the response.
hubspot.crm.commerce.discounts: BatchResponseSimplePublicObject
Batch operation response containing results and processing status.
Fields
- completedAt string - Timestamp when the batch operation completed.
- requestedAt? string - Timestamp when the batch operation was requested.
- startedAt string - Timestamp when the batch operation began processing.
- links? record { string... } - Map of supplemental links related to the batch response.
- results SimplePublicObject[] - Array of discount objects returned by the batch operation.
- status "PENDING"|"PROCESSING"|"CANCELED"|"COMPLETE" - Current processing status of the batch request.
hubspot.crm.commerce.discounts: BatchResponseSimplePublicObjectWithErrors
Batch operation response containing processed discount results, status, timestamps, and any errors encountered.
Fields
- completedAt string - Timestamp when the batch operation completed.
- numErrors? Signed32 - Total number of errors encountered during the batch operation.
- requestedAt? string - Timestamp when the batch operation was requested.
- startedAt string - Timestamp when the batch operation began processing.
- links? record { string... } - Map of relevant links associated with the batch response.
- results SimplePublicObject[] - List of successfully processed discount objects from the batch.
- errors? StandardError[] - List of errors encountered for individual records in the batch.
- status "PENDING"|"PROCESSING"|"CANCELED"|"COMPLETE" - Current processing status of the batch operation.
hubspot.crm.commerce.discounts: BatchResponseSimplePublicUpsertObject
Batch operation response containing upserted discount objects with status and timing metadata.
Fields
- completedAt string - Datetime when the batch operation completed.
- requestedAt? string - Datetime when the batch operation was requested.
- startedAt string - Datetime when the batch operation started processing.
- links? record { string... } - Map of relevant links associated with the batch response.
- results SimplePublicUpsertObject[] - Array of upserted discount objects returned by the batch operation.
- status "PENDING"|"PROCESSING"|"CANCELED"|"COMPLETE" - Current status of the batch operation: PENDING, PROCESSING, CANCELED, or COMPLETE.
hubspot.crm.commerce.discounts: BatchResponseSimplePublicUpsertObjectWithErrors
Batch upsert response including results, status, and any encountered errors.
Fields
- completedAt string - Timestamp indicating when the batch operation completed.
- numErrors? Signed32 - Total number of errors encountered during the batch operation.
- requestedAt? string - Timestamp indicating when the batch operation was requested.
- startedAt string - Timestamp indicating when the batch operation began processing.
- links? record { string... } - Map of relevant hypermedia links associated with the batch response.
- results SimplePublicUpsertObject[] - Array of successfully upserted discount objects.
- errors? StandardError[] - Array of errors encountered for individual records in the batch.
- status "PENDING"|"PROCESSING"|"CANCELED"|"COMPLETE" - Current processing status of the batch upsert request.
hubspot.crm.commerce.discounts: CollectionResponseAssociatedId
Paginated collection of associated object IDs.
Fields
- paging? Paging - Pagination cursors for navigating to the next or previous result page.
- results AssociatedId[] - Array of associated object IDs returned in the response.
hubspot.crm.commerce.discounts: CollectionResponseSimplePublicObjectWithAssociationsForwardPaging
Paginated collection of discount objects with their associated records.
Fields
- paging? ForwardPaging - Pagination object providing a cursor for forward navigation.
- results SimplePublicObjectWithAssociations[] - Array of discount objects returned in the current page.
hubspot.crm.commerce.discounts: CollectionResponseWithTotalSimplePublicObjectForwardPaging
Paginated collection of discount objects with a total count and forward paging cursor.
Fields
- total Signed32 - Total number of discount records matching the request.
- paging? ForwardPaging - Pagination object providing a cursor for forward navigation.
- results SimplePublicObject[] - Array of discount objects returned in the current page.
hubspot.crm.commerce.discounts: ConnectionConfig
Provides a set of configurations for controlling the behaviours when communicating with a remote HTTP endpoint.
Fields
- auth BearerTokenConfig|OAuth2RefreshTokenGrantConfig|ApiKeysConfig - Provides Auth configurations needed when communicating with a remote HTTP endpoint.
- httpVersion HttpVersion(default http:HTTP_2_0) - 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 30) - The maximum time to wait (in seconds) for a response before closing the connection
- forwarded string(default "disable") - The choice of setting
forwarded/x-forwardedheader
- followRedirects? FollowRedirects - Configurations associated with Redirection
- poolConfig? PoolConfiguration - 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 - Configurations associated with the behaviour of the Circuit Breaker
- retryConfig? RetryConfig - Configurations associated with retrying
- cookieConfig? CookieConfig - Configurations associated with cookies
- responseLimits ResponseLimitConfigs(default {}) - Configurations associated with inbound response size limits
- secureSocket? ClientSecureSocket - SSL/TLS-related options
- proxy? ProxyConfig - Proxy server related options
- socketConfig ClientSocketConfig(default {}) - Provides settings related to client socket configuration
- validation boolean(default true) - Enables the inbound payload validation functionality which provided by the constraint package. Enabled by default
- laxDataBinding boolean(default true) - Enables relaxed data binding on the client side. When enabled,
nilvalues are treated as optional, and absent fields are handled asnilabletypes. Enabled by default.
hubspot.crm.commerce.discounts: ErrorDetail
Detailed information about a specific error encountered in a request.
Fields
- subCategory? string - A specific category that contains more specific detail about the error
- code? string - The status code associated with the error detail
- 'in? string - The name of the field or parameter in which the error was found
- context? record { string[]... } - Context about the error condition
- message string - A human readable message describing the error along with remediation steps where appropriate
hubspot.crm.commerce.discounts: Filter
Defines a filter condition using a property, operator, and comparison value.
Fields
- highValue? string - Upper bound value used with the BETWEEN operator.
- propertyName string - The name of the property to filter on.
- values? string[] - A list of values to match against for multi-value operators.
- value? string - The single value to compare against the specified property.
- operator "EQ"|"NEQ"|"LT"|"LTE"|"GT"|"GTE"|"BETWEEN"|"IN"|"NOT_IN"|"HAS_PROPERTY"|"NOT_HAS_PROPERTY"|"CONTAINS_TOKEN"|"NOT_CONTAINS_TOKEN" - The comparison operator used to evaluate the filter condition.
hubspot.crm.commerce.discounts: FilterGroup
A group of filters combined to narrow search results.
Fields
- filters Filter[] - Array of filter conditions applied within this group.
hubspot.crm.commerce.discounts: ForwardPaging
Pagination object providing a cursor for forward navigation.
Fields
- next? NextPage - Pagination cursor object for retrieving the next page of results.
hubspot.crm.commerce.discounts: GetCrmV3ObjectsDiscountsDiscountIdQueries
Represents the Queries record for the operation: get-/crm/v3/objects/discounts/{discountId}
Fields
- associations? string[] - A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored
- archived boolean(default false) - Whether to return only results that have been archived
- propertiesWithHistory? string[] - A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored
- idProperty? string - The name of a property whose values are unique for this object type
- properties? string[] - A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored
hubspot.crm.commerce.discounts: GetCrmV3ObjectsDiscountsQueries
Represents the Queries record for the operation: get-/crm/v3/objects/discounts
Fields
- associations? string[] - A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored
- archived boolean(default false) - Whether to return only results that have been archived
- propertiesWithHistory? string[] - A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request
- 'limit Signed32(default 10) - The maximum number of results to display per page
- after? string - The paging cursor token of the last successfully read resource will be returned as the
paging.next.afterJSON property of a paged response containing more results
- properties? string[] - A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored
hubspot.crm.commerce.discounts: NextPage
Pagination cursor object for retrieving the next page of results.
Fields
- link? string - The URL query string to fetch the next page of results.
- after string - Cursor token representing the start of the next page.
hubspot.crm.commerce.discounts: 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.commerce.discounts: Paging
Pagination cursors for navigating to the next or previous result page.
Fields
- next? NextPage - Pagination cursor object for retrieving the next page of results.
- prev? PreviousPage - Pagination cursor information for navigating to the previous page of results.
hubspot.crm.commerce.discounts: PatchCrmV3ObjectsDiscountsDiscountIdQueries
Represents the Queries record for the operation: patch-/crm/v3/objects/discounts/{discountId}
Fields
- idProperty? string - The name of a property whose values are unique for this object type
hubspot.crm.commerce.discounts: PostCrmV3ObjectsDiscountsBatchReadQueries
Represents the Queries record for the operation: post-/crm/v3/objects/discounts/batch/read
Fields
- archived boolean(default false) - Whether to return only results that have been archived
hubspot.crm.commerce.discounts: PreviousPage
Pagination cursor information for navigating to the previous page of results.
Fields
- before string - The cursor token representing the start of the previous page.
- link? string - A direct URL link to the previous page of results.
hubspot.crm.commerce.discounts: PublicAssociationsForObject
Defines an association target object and its association types.
Fields
- types AssociationSpec[] - List of association type specifications for the target object.
- to PublicObjectId - Represents a reference to a public object by its unique identifier.
hubspot.crm.commerce.discounts: PublicObjectId
Represents a reference to a public object by its unique identifier.
Fields
- id string - Unique identifier of the referenced object.
hubspot.crm.commerce.discounts: PublicObjectSearchRequest
Request payload for searching discount objects with filters, sorting, and pagination.
Fields
- query? string - Full-text search query string to filter discounts.
- 'limit? Signed32 - Maximum number of results to return per page.
- after? string - Cursor token for retrieving the next page of results.
- sorts? string[] - List of sort criteria to order the search results.
- properties? string[] - List of properties to include in the response objects.
- filterGroups? FilterGroup[] - Groups of filters to apply when narrowing search results.
hubspot.crm.commerce.discounts: SimplePublicObject
Represents a single discount object with its properties, timestamps, and archival status.
Fields
- createdAt string - Timestamp when the discount record was created.
- archived? boolean - Indicates whether the discount has been archived.
- archivedAt? string - Timestamp when the discount record was archived.
- propertiesWithHistory? record { ValueWithTimestamp[]... } - Map of property names to their historical values with timestamps.
- id string - Unique identifier of the discount record.
- properties record { string?... } - Map of discount property names to their current string values.
- updatedAt string - Timestamp when the discount record was last updated.
hubspot.crm.commerce.discounts: SimplePublicObjectBatchInput
Input object for batch updating a discount record by ID or unique property.
Fields
- idProperty? string - The property name used as the unique identifier for the record.
- objectWriteTraceId? string - Trace ID for tracking the write operation.
- id string - The unique identifier of the discount record to update.
- properties record { string... } - Key-value pairs of discount properties to update.
hubspot.crm.commerce.discounts: SimplePublicObjectBatchInputUpsert
Input schema for upserting a single discount object, requiring an ID and property map.
Fields
- idProperty? string - The property name used as the unique identifier for upsert.
- objectWriteTraceId? string - Trace ID for tracking the object write operation.
- id string - The unique identifier of the discount object to upsert.
- properties record { string... } - Key-value map of discount properties to create or update.
hubspot.crm.commerce.discounts: SimplePublicObjectId
A minimal object containing only the unique identifier of a record.
Fields
- id string - The unique identifier of the object.
hubspot.crm.commerce.discounts: SimplePublicObjectInput
Input schema for creating or updating a discount object with its properties.
Fields
- objectWriteTraceId? string - Trace identifier for tracking the write operation.
- properties record { string... } - Key-value map of discount property names and their values.
hubspot.crm.commerce.discounts: SimplePublicObjectInputForCreate
Input object for creating a new discount record with properties and associations.
Fields
- associations PublicAssociationsForObject[] - List of associations linking the new discount to other CRM objects.
- objectWriteTraceId? string - Trace ID for tracking the write operation.
- properties record { string... } - Key-value pairs of discount properties to set on creation.
hubspot.crm.commerce.discounts: SimplePublicObjectWithAssociations
A discount object including its properties, metadata, and associated records.
Fields
- associations? record { CollectionResponseAssociatedId... } - Map of associated objects grouped by association type.
- createdAt string - Timestamp when the discount object was created.
- archived? boolean - Indicates whether the discount object is archived.
- archivedAt? string - Timestamp when the discount object was archived.
- propertiesWithHistory? record { ValueWithTimestamp[]... } - Map of property names to their historical values with timestamps.
- id string - Unique identifier of the discount object.
- properties record { string?... } - Key-value map of the discount object's current property values.
- updatedAt string - Timestamp when the discount object was last updated.
hubspot.crm.commerce.discounts: SimplePublicUpsertObject
Represents a discount object returned after an upsert operation, indicating whether it was newly created.
Fields
- createdAt string - The timestamp when the object was originally created.
- archived? boolean - Indicates whether the object has been archived.
- archivedAt? string - The timestamp when the object was archived, if applicable.
- 'new boolean - Indicates whether the object was newly created by the upsert.
- propertiesWithHistory? record { ValueWithTimestamp[]... } - A map of property values including their historical change records.
- id string - The unique identifier of the object.
- properties record { string... } - A map of the object's property names to their current values.
- updatedAt string - The timestamp when the object was last updated.
hubspot.crm.commerce.discounts: StandardError
Standard error response structure returned by the Discounts API.
Fields
- subCategory? record {} - Optional sub-category providing additional error classification.
- context record { string[]... } - Key-value map of contextual details related to the error.
- links record { string... } - Map of relevant links associated with the error response.
- id? string - Unique identifier for the error instance.
- category string - High-level category classifying the type of error.
- message string - Human-readable description of the error.
- errors ErrorDetail[] - List of detailed error objects describing individual failures.
- status string - HTTP status code or status label for the error response.
hubspot.crm.commerce.discounts: ValueWithTimestamp
A property value paired with its source information and the timestamp of the last update.
Fields
- sourceId? string - Identifier of the source that set this value.
- sourceType string - The type of source that provided this value.
- sourceLabel? string - Human-readable label describing the value's source.
- updatedByUserId? Signed32 - ID of the user who last updated this value.
- value string - The property value as a string.
- timestamp string - Datetime when this value was last updated.
Import
import ballerinax/hubspot.crm.commerce.discounts;Metadata
Released date: 19 days ago
Version: 2.0.2
License: Apache-2.0
Compatibility
Platform: any
Ballerina version: 2201.12.2
GraalVM compatible: Yes
Pull count
Total: 49
Current verison: 19
Weekly downloads
Keywords
discounts
commerce
Vendor/HubSpot
Area/CRM & Sales
Type/Connector
Contributors