Skip to content

Catalog View Searches example seems to have an error #432

@davemv

Description

@davemv

Is there an existing issue for this?

  • 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/<store_code>/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/<store_code>/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.

Image

Anything else that can help to cover this?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    🆕 Ready for Grooming

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions