Square icon

Square

Consume Square API

Catalog → Search Items

AI-generated

Overview

This node operation allows users to search for catalog items within the Square API. It supports filtering items based on a JSON query filter, and additional optional filters such as category IDs, custom attribute filters, enabled location IDs, product types, and stock levels. Users can choose to return all matching results or limit the number of results returned. This operation is useful for retrieving specific catalog items based on complex search criteria, such as finding items in certain categories, with specific stock levels, or available at certain locations.

Use Case Examples

  1. A coffee shop owner wants to find all catalog items related to 'coffee' to update their pricing.
  2. A retailer needs to retrieve all items that are currently out of stock to manage inventory.
  3. A business wants to filter catalog items by product types like 'REGULAR' or 'APPOINTMENTS_SERVICE' for reporting.

Properties

Name Meaning
Search Query The JSON query filter used to search catalog items. If left empty, all items are returned.
Return All Boolean flag to determine whether to return all matching results or limit the number of results.
Limit Maximum number of catalog items to return when 'Return All' is false.
Additional Fields Optional filters to refine the search results, including category IDs, custom attribute filters, enabled location IDs, product types, and stock levels.

Output

JSON

  • items - Array of catalog items matching the search criteria.

Dependencies

  • Square API with appropriate API key credentials

Troubleshooting

  • Ensure the 'Search Query' and 'Custom Attribute Filters' fields contain valid JSON; otherwise, the node will throw a validation error.
  • If the API returns an error, check that the API credentials and permissions are correctly configured.
  • When 'Return All' is set to true, large result sets may take longer to retrieve; consider using limits to optimize performance.

Links

Discussion