Square: Retrieve Catalog Object
Square catalog.retrieveCatalogObject: arguments, response, policy and SDK examples.
← Catalog operations · Get started
Operation square.retrievecatalogobject
Provider route: GET /v2/catalog/object/{object_id}. 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"]["retrieveCatalogObject"]>[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.retrieveCatalogObject(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.retrieve_catalog_object(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.object_id | string | Required within parent | |
query | object | Optional | Additional keys: not allowed |
query.include_related_objects | boolean | Optional | Default: false |
query.catalog_version | JSON | Optional | |
query.catalog_version (anyOf 1) | integer | Alternative | Format: int64 Minimum: -9223372036854775808 Maximum: 9223372036854775807 |
query.catalog_version (anyOf 2) | string | Alternative | Pattern: ^(?:-(?:1[0-9]{18}|[2-8][0-9]{18}|9(?:0[0-9]{17}|1[0-9]{17}|2(?:0[0-9]{16}|1[0-9]{16}|2(?:0[0-9]{15}|[1-2][0-9]{15}|3(?:0[0-9]{14}|[1-2][0-9]{14}|3(?:0[0-9]{13}|[1-6][0-9]{13}|7(?:0[0-9]{12}|1[0-9]{12}|20(?:0[0-9]{10}|[1-2][0-9]{10}|3(?:0[0-9]{9}|[1-5][0-9]{9}|6(?:0[0-9]{8}|[1-7][0-9]{8}|8(?:0[0-9]{7}|[1-4][0-9]{7}|5(?:0[0-9]{6}|[1-3][0-9]{6}|4(?:0[0-9]{5}|[1-6][0-9]{5}|7(?:0[0-9]{4}|[1-6][0-9]{4}|7(?:0[0-9]{3}|[1-4][0-9]{3}|5(?:0[0-9]{2}|[1-7][0-9]{2}|80[0-8]))))))))))))))))|-[1-9][0-9]{0,17}|0|(?:1[0-9]{18}|[2-8][0-9]{18}|9(?:0[0-9]{17}|1[0-9]{17}|2(?:0[0-9]{16}|1[0-9]{16}|2(?:0[0-9]{15}|[1-2][0-9]{15}|3(?:0[0-9]{14}|[1-2][0-9]{14}|3(?:0[0-9]{13}|[1-6][0-9]{13}|7(?:0[0-9]{12}|1[0-9]{12}|20(?:0[0-9]{10}|[1-2][0-9]{10}|3(?:0[0-9]{9}|[1-5][0-9]{9}|6(?:0[0-9]{8}|[1-7][0-9]{8}|8(?:0[0-9]{7}|[1-4][0-9]{7}|5(?:0[0-9]{6}|[1-3][0-9]{6}|4(?:0[0-9]{5}|[1-6][0-9]{5}|7(?:0[0-9]{4}|[1-6][0-9]{4}|7(?:0[0-9]{3}|[1-4][0-9]{3}|5(?:0[0-9]{2}|[1-7][0-9]{2}|80[0-7]))))))))))))))))|[1-9][0-9]{0,17})$(?!\n) |
query.include_category_path_to_root | boolean | Optional | Default: false |
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 Retrieve Catalog Object — response body |
Referenced models: Retrieve Catalog Object — response body
Schemas
Section titled “Schemas”44 more schemas are linked from the tables above, on the schema pages.
Retrieve Catalog Object — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
errors | array | Optional | Any errors that occurred during the request. |
errors[] | Model | Each item | Expand Get Shift — response body — errors item |
object | Model | Optional | Expand Create Catalog Image — response body — image The `CatalogObject`s returned. |
related_objects | array | Optional | A list of `CatalogObject`s referenced by the object in the `object` field. |
related_objects[] | Model | Each item | Expand Create Catalog Image — response body — image |
Referenced models: Create Catalog Image — response body — image, Get Shift — response body — errors item
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
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 |
Create Catalog Image — response body — image time period data event
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a time period - either a single period or a repeating period. |
event | JSON | Optional | |
event (anyOf 1) | string | Alternative | An iCalendar (RFC 5545) [event](https://tools.ietf.org/html/rfc5545#section-3.6.1), which specifies the name, timing, duration and recurrence of this time period. Example: ``` DTSTART:20190707T180000 DURATION:P2H RRULE:FREQ=WEEKLY;BYDAY=MO,WE,FR ``` Only `SUMMARY`, `DTSTART`, `DURATION` and `RRULE` fields are supported. `DTSTART` must be in local (unzoned) time format. Note that while `BEGIN:VEVENT` and `END:VEVENT` is not required in the request. The response will always include them. |
event (anyOf 2) | null | Alternative |
Create Catalog Image — response body — image catalog v1 ids array item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A Square API V1 identifier of an item, including the object ID and its associated location ID. |
catalog_v1_id | JSON | Optional | |
catalog_v1_id (anyOf 1) | string | Alternative | The ID for an object used in the Square API V1, if the object ID differs from the Square API V2 object ID. |
catalog_v1_id (anyOf 2) | null | Alternative | |
location_id | JSON | Optional | |
location_id (anyOf 1) | string | Alternative | The ID of the `Location` this Connect V1 ID is associated with. |
location_id (anyOf 2) | null | Alternative |
Create Catalog Image — response body — image availability period data Represents a time period of availability
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a time period of availability. |
day_of_week | JSON | Optional | |
day_of_week (anyOf 1) | string | Alternative | Indicates the specific day of the week. The day of the week for this availability period. See [DayOfWeek](#type-dayofweek) for possible values Known values: SUN, MON, TUE, WED, THU, FRI, SAT |
day_of_week (anyOf 2) | null | Alternative | |
end_local_time | JSON | Optional | |
end_local_time (anyOf 1) | string | Alternative | The end time of an availability period, specified in local time using partial-time RFC 3339 format. For example, `21:00:00` for a period ending at 9:00 in the evening. Note that the seconds value is always :00, but it is appended for conformance to the RFC. |
end_local_time (anyOf 2) | null | Alternative | |
start_local_time | JSON | Optional | |
start_local_time (anyOf 1) | string | Alternative | The start time of an availability period, specified in local time using partial-time RFC 3339 format. For example, `8:30:00` for a period starting at 8:30 in the morning. Note that the seconds value is always :00, but it is appended for conformance to the RFC. |
start_local_time (anyOf 2) | null | Alternative |
Create Catalog Image — response body — image custom attribute values object value
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | An instance of a custom attribute. Custom attributes can be defined and added to `ITEM` and `ITEM_VARIATION` type catalog objects. [Read more about custom attributes](https://developer.squareup.com/docs/catalog-api/add-custom-attributes). |
boolean_value | JSON | Optional | |
boolean_value (anyOf 1) | boolean | Alternative | A `true` or `false` value. Populated if `type` = `BOOLEAN`. |
boolean_value (anyOf 2) | null | Alternative | |
custom_attribute_definition_id | string | Optional | The id of the [CatalogCustomAttributeDefinition](entity:CatalogCustomAttributeDefinition) this value belongs to. Read only: true |
key | string | Optional | If the associated `CatalogCustomAttributeDefinition` object is defined by another application, this key is prefixed by the defining application ID. For example, if the CatalogCustomAttributeDefinition has a key attribute of "cocoa_brand" and the defining application ID is "abcd1234", this key is "abcd1234:cocoa_brand" when the application making the request is different from the application defining the custom attribute definition. Otherwise, the key is simply "cocoa_brand". Read only: true |
name | JSON | Optional | |
name (anyOf 1) | string | Alternative | The name of the custom attribute. |
name (anyOf 2) | null | Alternative | |
number_value | JSON | Optional | |
number_value (anyOf 1) | string | Alternative | Populated if `type` = `NUMBER`. Contains a string representation of a decimal number, using a `.` as the decimal separator. |
number_value (anyOf 2) | null | Alternative | |
selection_uid_values | JSON | Optional | |
selection_uid_values (anyOf 1) | array | Alternative | One or more choices from `allowed_selections`. Populated if `type` = `SELECTION`. |
selection_uid_values (anyOf 1)[] | string | Each item | |
selection_uid_values (anyOf 2) | null | Alternative | |
string_value | JSON | Optional | |
string_value (anyOf 1) | string | Alternative | The string value of the custom attribute. Populated if `type` = `STRING`. |
string_value (anyOf 2) | null | Alternative | |
type | string | Optional | Defines the possible types for a custom attribute. A copy of type from the associated `CatalogCustomAttributeDefinition`. See [CatalogCustomAttributeDefinitionType](#type-catalogcustomattributedefinitiontype) for possible values Known values: STRING, BOOLEAN, NUMBER, SELECTION Read only: true |
Create Catalog Image — response body — image type
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | string | Root | Possible 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 |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: square.retrievecatalogobject. Catalog operation: RetrieveCatalogObject. 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"}