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:
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.
To retrieve menu data from a Square account, you can use the Square Catalog API. Menus in Square are represented as catalog categories with a CategoryType of MENU_CATEGORY. Here’s how you can fetch the menu data:
Get the Root Menu Categories: Use the SearchCatalogObjects endpoint to retrieve all top-level menu categories. You need to filter for CatalogCategory objects that are both top-level (is_top_level = 1) and menu categories (category_type = "2").
Get the Child Menu Categories: Once you have the root categories, use the SearchCatalogObjects endpoint again to get all child categories under these root categories. These will also be MENU_CATEGORY types.
Get Menu Items: Finally, to complete the menu, retrieve the items, variations, and any related resources (like modifier lists and images) using the SearchCatalogObjects endpoint. Make sure to include the include_related_objects: true query parameter to get all related objects.
This process will allow you to reconstruct the menu hierarchy and retrieve all necessary menu data from the Square account.