Dan Posted March 9, 2018 Share Posted March 9, 2018 Hi, I am trying to make a web request to a site made with Prestashop (v.1.7.3 with dummy content) in order to show the list of products and the product details (including images) within a table view of an iOS app I am currently prototyping using SWIFT 4. No intention so far to put new products nor make purchases through the app, just mirror the shop in the app. I have checked the Prestashop Web Services documentation, created an auth key and I have found that it is possible to get the products in JSON format using an url formatted as: http://access_key@my_website.com/api/products?output_format=JSON What I get is the following JSON file: {"products":[{"id":2},{"id":4},{"id":8},{"id":1},{"id":16},{"id":17},{"id":18},{"id":6},{"id":7},{"id":9},{"id":10},{"id":11},{"id":15},{"id":19},{"id":3},{"id":5},{"id":12},{"id":13},{"id":14}]} It seems something like a dictionary, with only the identifiers of each product. Now I am stuck, since I do not know how to extract more info about each product from this JSON file. The Prestashop Web Services documentation is not very clear and it is basically php oriented. Thanks for any suggestion or reference to study! 1 Link to comment Share on other sites More sharing options...
jgamio Posted March 11, 2018 Share Posted March 11, 2018 I not sure at these moment i think is an option to show all detail but you can use something like these &display=[id,name,reference,price]&output_format=JSON 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now