Square: Search Catalog Items
Square catalog.searchCatalogItems: arguments, response, policy and SDK examples.
← Catalog operations · Get started
Operation square.searchcatalogitems
Provider route: POST /v2/catalog/search-catalog-items. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/square with npm, or alter-sdk-square with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { SquareIntegration } from "@alter-ai/square";
async function execute(input: Parameters<SquareIntegration["catalog"]["searchCatalogItems"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new SquareIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.catalog.searchCatalogItems(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_square import SquareIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = SquareIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.catalog.search_catalog_items(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
body | Model | Required within parent | Expand Search Catalog Items — request body — body |
Referenced models: Search Catalog Items — request body — body
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 Search Catalog Items — response body |
Referenced models: Search Catalog Items — response body
Schemas
Section titled “Schemas”51 more schemas are linked from the tables above, on the schema pages.
Search Catalog Items — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Defines the response body returned from the [SearchCatalogItems](api-endpoint:Catalog-SearchCatalogItems) endpoint. |
cursor | string | Optional | Pagination token used in the next request to return more of the search result. |
errors | array | Optional | Any errors that occurred during the request. |
errors[] | Model | Each item | Expand Get Shift — response body — errors item |
included_resources | Model | Optional | Expand Search Catalog Items — response body — included resources Related resources included in the response as requested via include_options |
items | array | Optional | Returned items matching the specified query expressions. |
items[] | Model | Each item | Expand Create Catalog Image — response body — image |
matched_variation_ids | array | Optional | Ids of returned item variations matching the specified query expression. |
matched_variation_ids[] | string | Each item |
Referenced models: Create Catalog Image — response body — image, Get Shift — response body — errors item, Search Catalog Items — response body — included resources
Search Catalog Items — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Defines the request body for the [SearchCatalogItems](api-endpoint:Catalog-SearchCatalogItems) endpoint. |
archived_state | string | Optional | Defines the values for the `archived_state` query expression used in [SearchCatalogItems](api-endpoint:Catalog-SearchCatalogItems) to return the archived, not archived or either type of catalog items. The query filter to return not archived (`ARCHIVED_STATE_NOT_ARCHIVED`), archived (`ARCHIVED_STATE_ARCHIVED`), or either type (`ARCHIVED_STATE_ALL`) of items. One of: ARCHIVED_STATE_NOT_ARCHIVED, ARCHIVED_STATE_ARCHIVED, ARCHIVED_STATE_ALL |
category_ids | array | Optional | The category id query expression to return items containing the specified category IDs. |
category_ids[] | string | Each item | |
cursor | string | Optional | The pagination token, returned in the previous response, used to fetch the next batch of pending results. |
custom_attribute_filters | array | Optional | The customer-attribute filter to return items or item variations matching the specified custom attribute expressions. A maximum number of 10 custom attribute expressions are supported in a single call to the [SearchCatalogItems](api-endpoint:Catalog-SearchCatalogItems) endpoint. |
custom_attribute_filters[] | Model | Each item | Expand Search Catalog Items — request body — body custom attribute filters item |
enabled_location_ids | array | Optional | The enabled-location query expression to return items and item variations having specified enabled locations. |
enabled_location_ids[] | string | Each item | |
include_options | Model | Optional | Expand Search Catalog Items — request body — body include options Options to include related resources in the response. |
limit | integer | Optional | The maximum number of results to return per page. The default value is 100. Maximum: 100 |
product_types | array | Optional | The product types query expression to return items or item variations having the specified product types. |
product_types[] | string | Each item | The type of a CatalogItem. Connect V2 only allows the creation of `REGULAR` or `APPOINTMENTS_SERVICE` items. One of: REGULAR, GIFT_CARD, APPOINTMENTS_SERVICE, FOOD_AND_BEV, EVENT, DIGITAL, DONATION, LEGACY_SQUARE_ONLINE_SERVICE, LEGACY_SQUARE_ONLINE_MEMBERSHIP |
sort_order | string | Optional | The order (e.g., chronological or alphabetical) in which results from a request are returned. The order to sort the results by item names. The default sort order is ascending (`ASC`). See [SortOrder](#type-sortorder) for possible values One of: DESC, ASC |
stock_levels | array | Optional | The stock-level query expression to return item variations with the specified stock levels. See [SearchCatalogItemsRequestStockLevel](#type-searchcatalogitemsrequeststocklevel) for possible values |
stock_levels[] | string | Each item | Defines supported stock levels of the item inventory. One of: OUT, LOW |
text_filter | string | Optional | The text filter expression to return items or item variations containing specified text in the `name`, `description`, or `abbreviation` attribute value of an item, or in the `name`, `sku`, or `upc` attribute value of an item variation. |
Referenced models: Search Catalog Items — request body — body custom attribute filters item, Search Catalog Items — request body — body include options
Get Shift — response body — errors item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents an error encountered during a request to the Connect API. See [Handling errors](https://developer.squareup.com/docs/build-basics/handling-errors) for more information. |
category | string | Required within parent | Indicates which high-level category of error has occurred during a request to the Connect API. The high-level category for the error. See [ErrorCategory](#type-errorcategory) for possible values Known values: API_ERROR, AUTHENTICATION_ERROR, INVALID_REQUEST_ERROR, RATE_LIMIT_ERROR, PAYMENT_METHOD_ERROR, REFUND_ERROR, MERCHANT_SUBSCRIPTION_ERROR, EXTERNAL_VENDOR_ERROR |
code | Model | Required within parent | Expand Get Shift — response body — errors item code The specific code of the error. See [ErrorCode](#type-errorcode) for possible values |
detail | string | Optional | A human-readable description of the error for debugging purposes. |
field | string | Optional | The name of the field provided in the original request (if any) that the error pertains to. |
Referenced models: Get Shift — response body — errors item code
Search Catalog Items — response body — included resources
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Related resources of the response `CatalogObject`s requested using `IncludeOptions` |
ancestor_modifiers | JSON | Optional | |
ancestor_modifiers (anyOf 1) | array | Alternative | Ancestor `CatalogModifierList`s as requested via INCLUDE_ANCESTOR_MODIFIERS |
ancestor_modifiers (anyOf 1)[] | Model | Each item | Expand Create Catalog Image — response body — image |
ancestor_modifiers (anyOf 2) | null | Alternative | |
nested_modifiers | JSON | Optional | |
nested_modifiers (anyOf 1) | array | Alternative | Nested `CatalogModifierList`s as requested via `INCLUDE_NESTED_MODIFIERS`. |
nested_modifiers (anyOf 1)[] | Model | Each item | Expand Create Catalog Image — response body — image |
nested_modifiers (anyOf 2) | null | Alternative |
Referenced models: Create Catalog Image — response body — image
Search Catalog Items — request body — body include options
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Options to include related resources of the requested `CatalogObject`s. Related resources will be included in `IncludedResources` in the response. |
include | JSON | Optional | |
include (anyOf 1) | array | Alternative | Resources to include in the response. See [IncludeType](#type-includetype) for possible values |
include (anyOf 1)[] | string | Each item | Related resources of requested `CatalogObject`s to include as part of the response. One of: INCLUDE_NESTED_MODIFIERS, INCLUDE_ANCESTOR_MODIFIERS |
include (anyOf 2) | null | Alternative |
Create Catalog Image — response body — image image data caption, name, photo studio order id, url
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | An image file to use in Square catalogs. It can be associated with `CatalogItem`, `CatalogItemVariation`, `CatalogCategory`, and `CatalogModifierList` objects. Only the images on items and item variations are exposed in Dashboard. Only the first image on an item is displayed in Square Point of Sale (SPOS). Images on items and variations are displayed through Square Online Store. Images on other object types are for use by 3rd party application developers. |
caption | JSON | Optional | |
caption (anyOf 1) | string | Alternative | A caption that describes what is shown in the image. Displayed in the Square Online Store. This is a searchable attribute for use in applicable query filters using the [SearchCatalogObjects](api-endpoint:Catalog-SearchCatalogObjects). |
caption (anyOf 2) | null | Alternative | |
name | JSON | Optional | |
name (anyOf 1) | string | Alternative | The internal name to identify this image in calls to the Square API. This is a searchable attribute for use in applicable query filters using the [SearchCatalogObjects](api-endpoint:Catalog-SearchCatalogObjects). It is not unique and should not be shown in a buyer facing context. |
name (anyOf 2) | null | Alternative | |
photo_studio_order_id | JSON | Optional | |
photo_studio_order_id (anyOf 1) | string | Alternative | The immutable order ID for this image object created by the Photo Studio service in Square Online Store. |
photo_studio_order_id (anyOf 2) | null | Alternative | |
url | JSON | Optional | |
url (anyOf 1) | string | Alternative | The URL of this image, generated by Square after an image is uploaded using the [CreateCatalogImage](api-endpoint:Catalog-CreateCatalogImage) endpoint. To modify the image, use the UpdateCatalogImage endpoint. Do not change the URL field. |
url (anyOf 2) | null | Alternative |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: square.searchcatalogitems. Catalog operation: SearchCatalogItems. 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: ["ITEMS_READ"]
Pinned headers: {"Square-Version": "2026-11-18"}