question

comicbookrealm avatar image
0 Likes"
comicbookrealm asked

Invalid Aspect Filter

I am migrating to the Browse API and have run into an issue. I am trying to convert so that users can specify the "Era" of the item.

The call is

&aspect_filter=categoryId:63,Era:Bronze Age (1970-83)

I am getting

"message": "The Era aspect_filter value is invalid. For information, see the API call reference documentation.",
            "parameters": [
                {
                    "name": "aspectFilter",
                    "value": "Era"
                },
                {
                    "name": "aspectFilterValue",
                    "value": "Bronze Age (1970-83)"
                }
            ]

But if I look at the ASPECT_REFINEMENTS I see:

"dominantCategoryId": "63",
        "aspectDistributions": [{
            "localizedAspectName": "Era",
            "aspectValueDistributions": [{
                "localizedAspectValue": "Silver Age (1956-69)",
                "matchCount": 7426,
                "refinementHref": "https://api.ebay.com/buy/browse/v1/item_summary/search?q=amazing&limit=50&category_ids=63&fieldgroups=ASPECT_REFINEMENTS&aspect_filter=categoryId%3A63,Era%3A%7BSilver%20Age%20%281956%2D69%29%7D"
            }, {
                "localizedAspectValue": "Modern Age (1992-Now)",
                "matchCount": 64222,
                "refinementHref": "https://api.ebay.com/buy/browse/v1/item_summary/search?q=amazing&limit=50&category_ids=63&fieldgroups=ASPECT_REFINEMENTS&aspect_filter=categoryId%3A63,Era%3A%7BModern%20Age%20%281992%2DNow%29%7D"
            }, {
                "localizedAspectValue": "Bronze Age (1970-83)",
                "matchCount": 21593,
                "refinementHref": "https://api.ebay.com/buy/browse/v1/item_summary/search?q=amazing&limit=50&category_ids=63&fieldgroups=ASPECT_REFINEMENTS&aspect_filter=categoryId%3A63,Era%3A%7BBronze%20Age%20%281970%2D83%29%7D"
            },


I have tried encoding, not encoding, with and without fieldgroups, etc. I am sure I am missing something.

browse apiaspectfilter
10 |600

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

al-541049 avatar image
0 Likes"
al-541049 answered

You need to include brackets for values with multiple options.

Your call should look like:

  
                
  1. &aspect_filter=categoryId:63,Era:{Bronze Age (1970-83)}


10 |600

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

britsy-45 avatar image
0 Likes"
britsy-45 answered

Thanks for the update and quick reply. I'll be sure to keep an eye on this thread. Looking for the same issue. Bumped into your thread. Thanks for creating it. Looking forward for solution.


10 |600

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.