The problem is that there are few resources around. Is there any library already there / dummy / or do I need to start creating an API from stratch?
Unlike one of the comments on your question, Prestashop really offers a REST service. The documentation mentions a "web service".
Quick links:
There are several versions of open source APIs , but not for Android / Java. However, you may find them useful as a guide.
A few notes:
By default, the web service feature is disabled. Therefore, to use it, you must first include it in the back office. Copied from documents:
Enabling the web service feature
Go to the PrestaShop back office, open the Web Service page under the Advanced Settings Menu, and then select Yes for the Enable PrestaShop webservice option. Save your changes: you're done!
An API key is required to communicate with the web service. You will need to create it for your Android application using the back office again:
Create Passkey
Open the Web Service page in the Advanced section. Settings ", and then click the" Add New "button to access the account configuration section. A long form will appear:
- Key The API key is the primary identifier for the webservice account. Creature. Click "Create" to get a unique authentication key. You can also create your own (32 characters long), but using the generated key prevents the erroneous actions of your key too easily. Using this key, you and other selected users will be able to access the web service.
Description of the key . It helps you remember who you created this key, what access rights are assigned to it, etc. The description is not public, but do not forget to put all the keywords related to the user, so that you can quickly find their key.
Condition . You can disable any key at any time.
- Access rights . This section is very important because it allows you to assign rights for each resource that you want to make available for this key. Indeed, you might want the user to have read and write access to some resources, but only read access to others - and not have access to more important ones. In the list of permissions, the checkbox most on the left allows you to define all the rights to this resource. Similarly, the checkbox at the top of each column gives you the right to choose (View, Edit, etc.) for all resources. Be sure to select the rights required to use this key. Do not give all rights to all resources for any key, save it only on your and yours. Shop Association. This appears only in multi-story mode. This allows you to choose which of your stores should have access to the key.
If you prefer to use a custom password rather than a generated one, make sure that it is very secure and that its rights are limited - and that it is 32 characters long!
Finally, to get an overview of the API methods:
Access web service from browser
The endpoint of your webservice store is located in the /api/ folder at the root of your Prestashop installation:
To access it, you must provide an API key when requested. There is no password, it is enough to provide your API key - and, therefore, the key must be kept secret by the user! You can either enter the API endpoint address directly, enter your API key or provide your API key in the address. Here is an example: UCCLLQ9N2ARSHWCXLT74KUKSSK34BFKX which is the API key.
You can test this with any browser that supports XML. If no permission has been set for the key, then the browser will continue to ask you to enter the key indefinitely.
The result should look something like this (for version 1.5.4.1 in PrestaShop):
<?xml version="1.0" encoding="UTF-8"?> <prestashop xmlns:xlink="http://www.w3.org/1999/xlink"> <api shop_name="MYSHOP"> <addresses>...</addresses> <carriers>...</carriers> <cart_rules>...</cart_rules> <carts>...</carts> <categories>...</categories> <combinations>...</combinations> <configurations>...</configurations> <contacts>...</contacts> <content_management_system>...</content_management_system> <countries>...</countries> <currencies>...</currencies> <customer_messages>...</customer_messages> <customer_threads>...</customer_threads> <customers>...</customers> <deliveries>...</deliveries> <employees>...</employees> <groups>...</groups> <guests>...</guests> <image_types>...</image_types> <images>...</images> <languages>...</languages> <manufacturers>...</manufacturers> <order_carriers>...</order_carriers> <order_details>...</order_details> <order_discounts>...</order_discounts> <order_histories>...</order_histories> <order_invoices>...</order_invoices> <order_payments>...</order_payments> <order_states>...</order_states> <orders>...</orders> <price_ranges>...</price_ranges> <product_feature_values>...</product_feature_values> <product_features>...</product_features> <product_option_values>...</product_option_values> <product_options>...</product_options> <product_suppliers>...</product_suppliers> <products>...</products> <search >...</search> <shop_groups>...</shop_groups> <shops>...</shops> <specific_price_rules>...</specific_price_rules> <specific_prices>...</specific_prices> <states>...</states> <stock_availables>...</stock_availables> <stock_movement_reasons>...</stock_movement_reasons> <stock_movements>...</stock_movements> <stocks>...</stocks> <stores>...</stores> <suppliers>...</suppliers> <supply_order_details>...</supply_order_details> <supply_order_histories>...</supply_order_histories> <supply_order_receipt_histories>...</supply_order_receipt_histories> <supply_order_states>...</supply_order_states> <supply_orders>...</supply_orders> <tags>...</tags> <tax_rule_groups>...</tax_rule_groups> <tax_rules>...</tax_rules> <taxes>...</taxes> <translated_configurations>...</translated_configurations> <warehouse_product_locations>...</warehouse_product_locations> <warehouses>...</warehouses> <weight_ranges>...</weight_ranges> <zones>...</zones> </api> <api shop_name="MYOTHERSHOP">...</api> <api shop_name="YETANOTHERSHOP">...</api> </prestashop>
Since you mention that you are mostly interested in supporting the basic / core functions in the Android app, I am inclined to say that this probably suits your needs. :)