Best way to identify items in an online menu Square

Hey, I’m currently working on building a custom Shop (Web app) for a client who uses Square POS (inventory) and square online for their website. I’m building the website because the customization options within the square builder are minimal for our use cases - they would like to dynamically set menu items via button and run ML algorithms to recommend customers different foods based on dietary preferences. I have previously tried doing the above (dynamically rearranging menu items) via square online embedded code but found it not to be the best option (could not move items from embedded code iframe).

I am now trying to approach this by building a custom Web App that uses the square API for displaying items and making purchases.

Is there any guidance on determining which menu items are available for a restaurant? I have tried using the catalog API but it returns all catalog items for the store even ones not present on their menu. After playing around with the catalog api, I have found catalog items with a channel_id give me a reduced menu size.

Any guidance or thoughts would help - also wondering if there is a way to directly access menu items for a store via api.

:wave: I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:

Additional Documentation

Catalog API Overview
Design a Catalog
Commerce API: Sell, Process, Manage, and Book

If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.

The Catalog API is indeed the correct API to use for retrieving menu items. However, it’s important to note that the Catalog API returns all catalog objects, not just those currently available or displayed on the menu.

To determine which items are available, you can use the SearchCatalogItems endpoint. This endpoint allows you to filter catalog items based on their availability at specific locations.

Regarding the channel_id, it is used to specify the sales channel for the catalog object. If you’re seeing a reduced menu size when using a specific channel_id, it’s likely that only those items are available for that specific sales channel.

Unfortunately, there isn’t a direct way to access only the menu items for a store via the API. You would need to implement additional logic in your application to filter out the items that are not currently on the menu. This could be based on item availability, item categories, or other criteria specific to the restaurant’s operations.

This answer was reviewed by @Bryan-Square.