Establishing a connection for exchange/synchronization


The integration of the online store published on the PrestaShop platform with MetaKocka enables:


- automated transfers of orders with all customer data (recipient, payer, type of payment, discounts, and ordered items)

- product synchronization (products can be transferred from the online store to MetaKocka with all the data you have already entered in the online store)

-automated stock synchronization


Invoices that are generated without additional work based on automatically transferred orders are also verified at FURS for legally defined means of payment, and for issued goods, the stock of goods is correspondingly reduced and refreshed in the online store as well (if so set).


Acquiring API keys


To establish a connection with the PrestaShop online store, acquiring the following data is needed:

  • Online store address
  • Access key to online service (PrestaShop WebService Key)

Access key to online service is valid until cancellation.


Step-by-step procedure:

1. Log in to the control panel of the PrestaShop online store and in the left menu under the category Configure, choose Advanced Parameters

2. Among the provided options, choose Webservice



3. On that page in the upper right angle choose Add new webservice key



4. The page for adding a new access key to the online service will open

5. Key is a mandatory parameter and either we can insert it or it can be automatically generated by clicking on the button »Generate« (recommended option)

6. Key description is our own description of the key's purpose (in this case, the description would be the following »Connection with MetaKocka service)«

7. Thirdly, the Status of the new key should be selected. It may be enabled (Yes) or disabled (No). In the case of connecting with MetaKocka, the key needs to be activated, otherwise, the connection may not work.

8. The last step of adding the new access key to the online service PrestaShop store is the selection of permissions that MetaKocka will have. In our case, it is enough, if all View (GET) and Modify (PUT) options are selected.


9. After the selection is completed, click on Save to save the settings and activate the key.



10. The online store address and just created Key are eventually entered into the MetaKocka web interface.


Go to Settings/Links (1), add the connection for Prestashop (2), enter the URL address of your online store (3), enter the key, that you received in the online store(4), and save (5). After saving, click on Test connection, in order to check if it is working.



Mapping products by codes

The reference field is used for product code.




Product synchronization ( Online store <> MetaKocka ) 

Only active products will be transferred.


More information about functionality can be found here.


Connection issues

401 Unauthorized error

In case of receiving error "401 Unauthorized error", then you need to make appropriate adjustments in Apache configuration. A description of the issue and solution is available on the following links: 



Quick response :

Adjustments need to be made in the v .htaccess file in the root directory of the online store.

Before:


RewriteRule . - [E=REWRITEBASE:/]

RewriteRule ^api$ api/ [L]


After (bold columns have been added):


RewriteRule . - [E=REWRITEBASE:/]

RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

RewriteRule ^api$ api/ [L]


Wrong key vs issues accessing API

If Apache is not properly configured on the store, you will receive the following error: 401 Unauthorized


If the key is wrong, the response will also be 401, but with the following content: {"errors":[{"code":20,"message":"Authentification key is not active"},{"code":21,"message":"No permission for this authentication key"}]}


Call simulation via REST client

Functionality via REST client can be checked in the following way: :

  1. for instance, your online store address is http://18.196.116.84, and it has a Key value of "1234".
  2. create URL address for connection test: http://18.196.116.84/api/configurations/?display=full&output_format=JSON
  3. Convert the key to Base64 (https://www.base64encode.org/) and insert it under the "Authorization" header with the value "Basic NEY2VjgzVDFLRURSQkpLWEkxWlVaRQ=".
  4. Make a call and you should receive a response with the data

Example of functionality in the picture below:


 Still not a MetaKocka user? Register now and test the functionality free of charge for 30 days!!