Square icon

Square

Consume Square API

Catalog → Get Object

AI-generated

Overview

This node operation retrieves a specific catalog object from the Square API using its unique Object ID. It supports optional parameters to include related objects referenced by the catalog object and to specify a particular version of the catalog object to retrieve. This operation is useful for scenarios where detailed information about a single catalog item, category, or modifier is needed, such as fetching product details for display or processing.

Use Case Examples

  1. Retrieve a catalog item by its ID to display detailed product information on an e-commerce site.
  2. Fetch a specific version of a catalog object to audit changes or revert to a previous version.
  3. Include related objects to get comprehensive data about a catalog item and its associated modifiers or categories.

Properties

Name Meaning
Object ID The ID of the catalog object to retrieve, used to specify which catalog object to fetch.
Include Related Objects Whether to include additional objects referenced by this catalog object in the response, providing more comprehensive data.
Catalog Version The specific version number of the catalog object to retrieve, allowing access to historical versions.

Output

JSON

  • id - The unique identifier of the catalog object.
  • type - The type of the catalog object (e.g., ITEM, CATEGORY).
  • version - The version number of the catalog object.
  • is_deleted - Indicates if the catalog object is deleted.
  • catalog_v1_ids - Legacy catalog IDs associated with the object.
  • present_at_all_locations - Whether the object is present at all locations.
  • present_at_location_ids - Specific location IDs where the object is present.
  • item_data - Detailed data for catalog items, if applicable.
  • category_data - Detailed data for catalog categories, if applicable.
  • modifier_list_data - Detailed data for modifier lists, if applicable.
  • tax_data - Tax-related data for the catalog object.
  • discount_data - Discount-related data for the catalog object.

Dependencies

  • Square API authentication credentials

Troubleshooting

  • Ensure the Object ID provided is correct and exists in the Square catalog to avoid 'not found' errors.
  • If including related objects, verify that the API user has permissions to access those related objects.
  • Check that the catalog version specified exists; otherwise, the API may return an error or the latest version by default.
  • Handle API rate limits and network errors gracefully, possibly by enabling retry logic or error handling in the workflow.

Links

Discussion