Skip to content

Square: Search Catalog Objects

Square catalog.searchCatalogObjects: arguments, response, policy and SDK examples.

← Catalog operations · Get started

Operation square.searchcatalogobjects

Provider route: POST /v2/catalog/search. Alter supplies the connection’s credentials and routing.

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"]["searchCatalogObjects"]>[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.searchCatalogObjects(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from 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_objects(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
bodyModelRequired within parentExpand Search Catalog Objects — request body — body

Referenced models: Search Catalog Objects — request body — body

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Search Catalog Objects — response body

Referenced models: Search Catalog Objects — response body

61 more schemas are linked from the tables above, on the schema pages.

Search Catalog Objects — response body
FieldTypePresenceDescription and constraints
$objectRoot
cursorstringOptionalThe pagination cursor to be used in a subsequent request. If unset, this is the final response.
See [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) for more information.
errorsarrayOptionalAny errors that occurred during the request.
errors[]ModelEach itemExpand Get Shift — response body — errors item
included_resourcesModelOptionalExpand Search Catalog Items — response body — included resources
A list of [CatalogObject](entity:CatalogObject)s referenced by the object in the `objects` field and specifically requested.
latest_timestringOptionalWhen the associated product catalog was last updated. Will
match the value for `end_time` or `cursor` if either field is included in the `SearchCatalog` request.
objectsarrayOptionalThe CatalogObjects returned.
objects[]ModelEach itemExpand Create Catalog Image — response body — image
related_objectsarrayOptionalA list of CatalogObjects referenced by the objects in the `objects` field.
related_objects[]ModelEach itemExpand Create Catalog Image — response body — image

Referenced models: Create Catalog Image — response body — image, Get Shift — response body — errors item, Search Catalog Items — response body — included resources

Search Catalog Objects — request body — body
FieldTypePresenceDescription and constraints
$objectRoot
begin_timestringOptionalReturn objects modified after this [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates), in RFC 3339
format, e.g., `2016-09-04T23:59:33.123Z`. The timestamp is exclusive - objects with a
timestamp equal to `begin_time` will not be included in the response.
cursorstringOptionalThe pagination cursor returned in the previous response. Leave unset for an initial request.
See [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) for more information.
include_category_path_to_rootbooleanOptionalSpecifies whether or not to include the `path_to_root` list for each returned category instance. The `path_to_root` list consists of `CategoryPathToRootNode` objects and specifies the path that starts with the immediate parent category of the returned category and ends with its root category. If the returned category is a top-level category, the `path_to_root` list is empty and is not returned in the response payload. If `include_category_path_to_root` is `true`, then the `include_deleted_objects` request parameter must be `false`. Both properties cannot be `true` at the same time.
include_deleted_objectsbooleanOptionalIf `true`, deleted objects will be included in the results. Defaults to `false`. Deleted objects will have their `is_deleted` field set to `true`. If `include_deleted_objects` is `true`, then the `include_category_path_to_root` request parameter must be `false`. Both properties cannot be `true` at the same time.
include_optionsModelOptionalExpand Search Catalog Items — request body — body include options
Options to include related resources in the response.
include_related_objectsbooleanOptionalIf `true`, the response will include additional objects that are related to the
requested objects. Related objects are objects that are referenced by object ID by the objects
in the response. This is helpful if the objects are being fetched for immediate display to a user.
This process only goes one level deep. Objects referenced by the related objects will not be included.
For example:

If the `objects` field of the response contains a CatalogItem, its associated
CatalogCategory objects, CatalogTax objects, CatalogImage objects and
CatalogModifierLists will be returned in the `related_objects` field of the
response. If the `objects` field of the response contains a CatalogItemVariation,
its parent CatalogItem will be returned in the `related_objects` field of
the response.

Default value: `false`
limitintegerOptionalA limit on the number of results to be returned in a single page. The limit is advisory -
the implementation may return more or fewer results. If the supplied limit is negative, zero, or
is higher than the maximum limit of 1,000, it will be ignored.
object_typesarrayOptionalThe desired set of object types to appear in the search results.

If this is unspecified, the operation returns objects of all the top level types at the version
of the Square API used to make the request. Object types that are nested onto other object types
are not included in the defaults.

At the current API version the default object types are:
ITEM, CATEGORY, TAX, DISCOUNT, MODIFIER_LIST,
PRICING_RULE, PRODUCT_SET, TIME_PERIOD, MEASUREMENT_UNIT,
SUBSCRIPTION_PLAN, ITEM_OPTION, CUSTOM_ATTRIBUTE_DEFINITION, QUICK_AMOUNT_SETTINGS.

Note that if you wish for the query to return objects belonging to nested types (i.e., COMPONENT, IMAGE,
ITEM_OPTION_VAL, ITEM_VARIATION, or MODIFIER), you must explicitly include all the types of interest
in this field.
object_types[]ModelEach itemExpand Upsert Catalog Object — request body — body object type
queryModelOptionalExpand Search Catalog Objects — request body — body query
A query to be used to filter or sort the results. If no query is specified, the entire catalog will be returned.

Referenced models: Upsert Catalog Object — request body — body object type, Search Catalog Objects — request body — body query, Search Catalog Items — request body — body include options

Get Shift — response body — errors item
FieldTypePresenceDescription and constraints
$objectRootRepresents 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.
categorystringRequired within parentIndicates 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
codeModelRequired within parentExpand Get Shift — response body — errors item code
The specific code of the error.
See [ErrorCode](#type-errorcode) for possible values
detailstringOptionalA human-readable description of the error for debugging purposes.
fieldstringOptionalThe 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
FieldTypePresenceDescription and constraints
$objectRootRelated resources of the response `CatalogObject`s requested using `IncludeOptions`
ancestor_modifiersJSONOptional
ancestor_modifiers (anyOf 1)arrayAlternativeAncestor `CatalogModifierList`s as requested via INCLUDE_ANCESTOR_MODIFIERS
ancestor_modifiers (anyOf 1)[]ModelEach itemExpand Create Catalog Image — response body — image
ancestor_modifiers (anyOf 2)nullAlternative
nested_modifiersJSONOptional
nested_modifiers (anyOf 1)arrayAlternativeNested `CatalogModifierList`s as requested via `INCLUDE_NESTED_MODIFIERS`.
nested_modifiers (anyOf 1)[]ModelEach itemExpand Create Catalog Image — response body — image
nested_modifiers (anyOf 2)nullAlternative

Referenced models: Create Catalog Image — response body — image

Upsert Catalog Object — request body — body object type
FieldTypePresenceDescription and constraints
$stringRootPossible types of CatalogObjects returned from the catalog, each
containing type-specific properties in the `*_data` field corresponding to the specified object type.
One of: ITEM, IMAGE, CATEGORY, ITEM_VARIATION, TAX, DISCOUNT, MODIFIER_LIST, MODIFIER, PRICING_RULE, PRODUCT_SET, TIME_PERIOD, MEASUREMENT_UNIT, SUBSCRIPTION_PLAN_VARIATION, ITEM_OPTION, ITEM_OPTION_VAL, CUSTOM_ATTRIBUTE_DEFINITION, QUICK_AMOUNTS_SETTINGS, SUBSCRIPTION_PLAN, AVAILABILITY_PERIOD
Search Catalog Items — request body — body include options
FieldTypePresenceDescription and constraints
$objectRootOptions to include related resources of the requested `CatalogObject`s. Related resources will be included in
`IncludedResources` in the response.
includeJSONOptional
include (anyOf 1)arrayAlternativeResources to include in the response.
See [IncludeType](#type-includetype) for possible values
include (anyOf 1)[]stringEach itemRelated resources of requested `CatalogObject`s to include as part of the response.
One of: INCLUDE_NESTED_MODIFIERS, INCLUDE_ANCESTOR_MODIFIERS
include (anyOf 2)nullAlternative
Create Catalog Image — response body — image type
FieldTypePresenceDescription and constraints
$stringRootPossible types of CatalogObjects returned from the catalog, each
containing type-specific properties in the `*_data` field corresponding to the specified object type.
Known values: ITEM, IMAGE, CATEGORY, ITEM_VARIATION, TAX, DISCOUNT, MODIFIER_LIST, MODIFIER, PRICING_RULE, PRODUCT_SET, TIME_PERIOD, MEASUREMENT_UNIT, SUBSCRIPTION_PLAN_VARIATION, ITEM_OPTION, ITEM_OPTION_VAL, CUSTOM_ATTRIBUTE_DEFINITION, QUICK_AMOUNTS_SETTINGS, SUBSCRIPTION_PLAN, AVAILABILITY_PERIOD

SDK function policy ID: square.searchcatalogobjects. Catalog operation: SearchCatalogObjects. 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"}

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand how our website, product, and documentation are used.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

Advertising

Shares visits and sign-ups with Meta, Reddit, and X so we can measure which of our ads work.

You can change these choices at any time from Cookie settings.