I’m trying to use search_catalog_items
to return a list of items for a specific Category ID, but I am doing something dumb–it always returns an empty set.
If I use search_catalog_objects
and use an exact_query
on an attribute name of category_id
, it returns the matching items, as expected:
# POST /v2/catalog/search
result = client.catalog.search_catalog_objects(
body: {
query: {
exact_query: {
attribute_name: "category_id",
attribute_value: "OMYCWOC2LJMXHTEKOKDM4C3G"
}
}
}
)
However, if I use “search_catalog_items” and supply the same category ID, it returns an empty set:
# POST /v2/catalog/search-catalog-items
result = client.catalog.search_catalog_items(
body: {
category_ids: [
"OMYCWOC2LJMXHTEKOKDM4C3G"
]
}
)
Obviously, i’m misunderstanding how search_catalog_items
is supposed to work. Can someone point out what i’m doing wrong?