HubSpot: List price book items
HubSpot priceBooks.getPriceBookItems: arguments, response, policy and SDK examples.
← Price books operations · Get started
Operation hubspot.price_books_get_price_book_items
Provider route: GET /commerce/price-books/2026-09/price-books/{priceBookId}/items. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/hubspot with npm, or alter-sdk-hubspot with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { HubSpotIntegration } from "@alter-ai/hubspot";
async function execute(input: Parameters<HubSpotIntegration["priceBooks"]["getPriceBookItems"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new HubSpotIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.priceBooks.getPriceBookItems(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_hubspot import HubSpotIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = HubSpotIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.price_books.get_price_book_items(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.priceBookId | integer | Required within parent | Format: int64 |
query | object | Optional | Additional keys: not allowed |
query.after | string | Optional | |
query.limit | integer | Optional | Format: int32 |
query.properties | array | Optional | |
query.properties[] | string | Each item |
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | Model | Root | Expand List price book items — response body |
Referenced models: List price book items — response body
Schemas
Section titled “Schemas”List price book items — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
paging | Model | Optional | Expand Retrieve price books — response body — paging |
results | array | Required within parent | An array of price book items, each represented by a PriceBookItemResponse object. |
results[] | Model | Each item | Expand Add price book items — response body |
Referenced models: Add price book items — response body, Retrieve price books — response body — paging
Add price book items — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
archived | boolean | Optional | A boolean indicating whether the price book item is archived. |
archivedAt | string | Optional | The date and time when the price book item was archived, in ISO 8601 format. Format: date-time |
billingFrequency | string | Optional | The frequency at which billing occurs for the price book item. Valid values include 'annually', 'biweekly', 'monthly', 'one_time', 'per_five_years', 'per_four_years', 'per_six_months', 'per_three_years', 'per_two_years', 'quarterly', and 'weekly'. Known values: ANNUALLY, BIWEEKLY, MONTHLY, PER_FIVE_YEARS, PER_FOUR_YEARS, PER_SIX_MONTHS, PER_THREE_YEARS, PER_TWO_YEARS, QUARTERLY, WEEKLY |
billingPeriod | string | Optional | The billing period for the price book item. |
costOfGoodsSold | string | Optional | The cost of goods sold for the price book item. |
createdAt | string | Optional | The date and time when the price book item was created, in ISO 8601 format. Format: date-time |
customProperties | object | Required within parent | A map of custom property names to their values for the price book item. Additional keys: see wildcard field |
customProperties.* | string | Additional keys | |
description | string | Optional | A description of the price book item. |
id | string | Required within parent | The unique identifier for the price book item. |
images | string | Optional | A string representing images associated with the price book item. |
name | string | Optional | The name of the price book item. |
priceBookId | string | Optional | The unique identifier for the price book containing this item. |
pricing | Model | Optional | Expand Add price book items — response body — pricing |
productClassification | string | Optional | The classification of the product. Valid values include 'BUNDLE', 'STANDALONE', and 'VARIANT'. Known values: BUNDLE, STANDALONE, VARIANT |
productId | string | Required within parent | The unique identifier for the product associated with the price book item. |
productType | string | Optional | The type of product. Valid values include 'INVENTORY', 'NON_INVENTORY', and 'SERVICE'. Known values: INVENTORY, NON_INVENTORY, SERVICE |
recurringBillingTerms | string | Optional | The terms of recurring billing for the price book item. Valid values include 'AUTOMATICALLY_RENEW' and 'FIXED'. Known values: AUTOMATICALLY_RENEW, FIXED |
sku | string | Optional | The stock keeping unit (SKU) of the price book item. |
status | string | Optional | The current status of the price book item. Valid values include 'active' and 'inactive'. Known values: active, inactive |
taxCategory | string | Optional | The tax category of the price book item. |
updatedAt | string | Optional | The date and time when the price book item was last updated, in ISO 8601 format. Format: date-time |
url | string | Optional | A URL associated with the price book item. |
Referenced models: Add price book items — response body — pricing
Retrieve price books — 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 Retrieve price books — response body — paging next |
Referenced models: Retrieve price books — response body — paging next
Add price book items — response body — pricing
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
prices | array | Required within parent | An array of price entries, each detailing the amount and currency for a specific pricing tier. |
prices[] | Model | Each item | Expand Add price book items — response body — pricing prices item |
pricingModel | string | Required within parent | The type of pricing model applied, which can be one of the following: 'FLAT', 'GRADUATED', 'STAIRSTEP', or 'VOLUME'. Known values: FLAT, GRADUATED, STAIRSTEP, VOLUME |
Referenced models: Add price book items — response body — pricing prices item
Retrieve price books — 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 used as a cursor for pagination to retrieve the next set of results. |
link | string | Optional | A string URL that provides a direct link to the next page of results. |
Add price book items — response body — pricing prices item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
currencyCode | string | Required within parent | A string representing the currency in which the price is denominated. |
maxQuantity | JSON | Optional | |
maxQuantity (anyOf 1) | integer | Alternative | A string specifying the maximum quantity for which this pricing entry is applicable. Format: int32 |
maxQuantity (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
price | JSON | Required within parent | |
price (anyOf 1) | number | Alternative | A number indicating the price of the product or service. |
price (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: hubspot.price_books_get_price_book_items. Catalog operation: price_books_get_price_book_items. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.
Required provider scopes: ["cpq.price_books.read"]