4

I am using this API for search:

http://domain.com/index.php/rest/V1/search?searchCriteria[requestName]=quick_search_container&searchCriteria[filterGroups][0][filters][0][field]=search_term&searchCriteria[filterGroups][0][filters][0][value]=life

The response is:

- Total results is 7

I need to get results in pagination mode so I updated the API to become:

http://domain.com/index.php/rest/V1/search?searchCriteria[requestName]=quick_search_container&searchCriteria[filterGroups][0][filters][0][field]=search_term&searchCriteria[filterGroups][0][filters][0][value]=life&searchCriteria[current_page]=1&searchCriteria[page_size]=5

The response is:

- Total results is 5

- Current page is 1

If I changed the current page 2, the response supposed to be:

-Total results is 2

- Current page is 2

But, I got the same result in the page 1.

1

1 Answer 1

2

rest/V1/products?searchCriteria[filterGroups][0][filters][0]
[field]=category_id&searchCriteria[filterGroups][0][filters][0]
[value]=7&searchCriteria[filterGroups][0][filters][0]
[conditionType]=eq&searchCriteria[sortOrders][0]
[field]=created_at&searchCriteria[sortOrders][0][direction]=DESC&searchCriteria[pageSize]=1&searchCriteria[currentPage]=4

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.