AdobeDocs / AdobeDocs/commerce-webapi
Catalog View Searches example seems to have an error
- Dominant language
- JavaScript
- Stars
- 13
- Forks
- 120
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 8
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Which topic?
https://developer.adobe.com/commerce/webapi/rest/use-rest/search-endpoint/#example-1
### What's wrong with the content?
The last example (the one that belongs to Catalog View Searches) seems to have an error. I tried it in Magento 2.4.7p1 community edition, and I get this response on postman:
{
"message": "Error occurred during \"filterGroups\" processing. Error occurred during \"filters\" processing. Error occurred during \"value\" processing. The \"array\" value's type is invalid. The \"string\" type was expected. Verify and try again.",
"trace": null
}
### What changes do you propose?
I propose to delete a small fragment:
Original content:
GET /rest//V1/search?searchCriteria[requestName]=catalog_view_container&
searchCriteria[filterGroups][0][filters][0][field]=category_ids&
searchCriteria[filterGroups][0][filters][0][value][0]=4& **<----- (Over here, delete tha last "[0]")**
searchCriteria[filterGroups][0][filters][0][condition_type]=eq
Proposed content:
GET /rest//V1/search?searchCriteria[requestName]=catalog_view_container&
searchCriteria[filterGroups][0][filters][0][field]=category_ids&
searchCriteria[filterGroups][0][filters][0][value]=4&
searchCriteria[filterGroups][0][filters][0][condition_type]=eq
That way, I get a 200 response.

### Anything else that can help to cover this?
_No response_
Contributor guide
Research direction
Start with the Catalog View Searches example at the linked Adobe Commerce REST documentation page and reproduce it in Postman against Magento 2.4.7p1. Compare the request parameter syntax with the reported error and verify the corrected example returns a 200 response; update only the erroneous example fragment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postman
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 58/100