Jump to content

Edit History

innovacy

innovacy

Because people still get to this post even though it is old (it is one of the first in google), here is the solution:

To receive the data for several entries of one resource, you are calling the URL without an ID, as example:

/api/products/

On this you can add several additional parameters to limit what you receive, with the 'filter' keyword. If you need a list of specific IDs, you can request:

/api/products/?filter[id]=[1|2|3|5|10]

And last you add what data you want to receive, with the 'display' keyword. You can use either 'full' or a list of fields to return, like this:

/api/products/?filter[id]=[1|2|5|10]&display=full
/api/products/?filter[id]=[1|2|3|5|10]&display=[id,name]

For a full list of capabilities using 'filter' and all available keywords, see: https://devdocs.prestashop.com/1.7/webservice/tutorials/advanced-use/additional-list-parameters/

innovacy

innovacy

Because people still get to this post even though it is old (it is one of the first in google), here is the solution:

To receive the data for several entries of one resource, you are calling the URL without an ID, as example:

/api/products

On this you can add several additional parameters to limit what you receive, with the 'filter' keyword. If you need a list of specific IDs, you can request:

/api/products?filter[id]=[1|2|3|5|10]

And last you add what data you want to receive, with the 'display' keyword. You can use either 'full' or a list of fields to return, like this:

/api/products/?filter[id]=[1|2|5|10]&display=full
/api/products/?filter[id]=[1|2|3|5|10]&display=[id,name]

For a full list of capabilities using 'filter' and all available keywords, see: https://devdocs.prestashop.com/1.7/webservice/tutorials/advanced-use/additional-list-parameters/

×
×
  • Create New...