Hello,
An item can be associated to more than one category. But how do I get the list of categories of an item? The .NET SDK only exposes a single CategoryId for an item. Is there a way to access the list of categories of an item?
Thank you
Hello,
An item can be associated to more than one category. But how do I get the list of categories of an item? The .NET SDK only exposes a single CategoryId for an item. Is there a way to access the list of categories of an item?
Thank you
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:
https://developer.squareup.com/docs/catalog-api/what-it-does
https://developer.squareup.com/docs/catalog-api/design-a-catalog
https://developer.squareup.com/docs/catalog-api/cookbook/create-catalog-image
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.
When you SearchCatalogObjects
or BathRetrieveCatalogObjects
you can set include_related_objects
to true
to include all the categories associated to catalog objects.
@Bryan-Square I have an example where only one category is returning in the related objects field but there are two IDs being returned for category in the objects field
When I go to map the ID to the related objects not all categories are being returned. This is for SearchCataLogObjects
I found the bug on Square’s side. The relatedObject is only returning categories if they appear on an item as a “reporting category” but not all categories mapped to an item. Looks like the graphql code on Square’s side needs to be updated to return relatedObjects from a merge of categories and reporting categories