- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm trying to retrieve all catalog products from the REST API by sending a GET request to /V1/products, with no parameters/search criteria. However, I'm getting an error that "%fieldName is a required field." Is it not possible to retrieve all products without any search criteria? Swagger isn't showing any parameters as required for this endpoint.
Thanks!
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ah, I realize I was overlooking the portion of the error that says the required field is 'searchCriteria'. Still, it doesn't make sense to me that searchCriteria is required, particularly since I can pass no value for it.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: REST API Get all Products
Interestingly, if I supply "?searchCriteria[page_size]=100", the query works, as does even "?searchCriteria=". However, I'd like to not pass any search criteria at all, including the query string itself, if possible.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: REST API Get all Products
Thus is searchCriteria mandatory?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: REST API Get all Products
It is, yes.