After my previous tutorial Adding prestashop products programmatically, we have decided to launch a new project where we will be using the PrestaShop Webservice API. The advantages of the PrestaShop Webservice API are that we can add, modify, and/or delete almost all types of data. One of the benefits of the PrestaShop Webservice API is that it also provides validation functions to prevent incorrect data from being entered into the database.
For this tutorial, we have provided a "package" that you can see in action by visiting our demo shop at https://demoshop.crezzur.com/ws-api/. You can easily download this package at the bottom of this post and add it to the root directory of your webshop. This package will enable you to perform some basic operations and gain a better understanding of the PrestaShop Webservice API.
The intention is to expand this package with additional functionalities based on your questions and feedback. Using this package, a developer with basic programming skills should be able to develop a page relatively easily, for example, to automatically add new products (e.g., with combinations) to their client's webshop (e.g., by using a cron job).
Setup the package
Unzip the ws-api.zip in the root directory of your webshop
Open the config.php file and replace the YOUR_SHOP_URL and the YOUR_API_KEY with the information of your shop.
Now you can try to add, edit a product, combination, ...
Based on the questions you ask, we will provide a Q&A session where we will explain the questions asked.
First release V0.0.1 (2023-06-13)
ws-api.zip