TABLE OF CONTENTS


Introduction


You can add a Magento data source to Feefo using a cURL command directly from your terminal. This method does not require logging into a server.


Removing HTML Suffix

Data sources can be configured to remove the .html suffix from product URLs using the excludeProductUrlSuffix boolean.



How it works - cURL Commands


Single Store ID


To add a Magento data source with a single store ID, use the following cURL command:


curl 'https://hub.feefo.com/api/magentoV2' -d '{
    "magentoV2": {
        "accessToken": "ACCESSTOKENPROVIDEDBYMERCHANT",
        "merchantId": "MERCHANTIDFROMGCP",
        "hostUrl": "HTTPSURLFROMMERCHANT",
        "schedulePeriod": "Daily",
        "username": "EMAILADDRESSOFUSERWHOCREATEDACCESSTOKEN",
        "password": "N/A",
        "storeIds": ["1"]
    }
}'


Multiple Store IDs


To add a Magento data source with multiple store IDs, use the following cURL command:


curl 'https://hub.feefo.com/api/magentoV2' -d '{
    "magentoV2": {
        "accessToken": "ACCESSTOKENPROVIDEDBYMERCHANT",
        "merchantId": "MERCHANTIDFROMGCP",
        "hostUrl": "HTTPSURLFROMMERCHANT",
        "schedulePeriod": "Daily",
        "username": "EMAILADDRESSOFUSERWHOCREATEDACCESSTOKEN",
        "password": "N/A",
        "storeIds": ["1", "2", "3"]
    }
}'


Remove .html Suffix


To configure the data source to remove the .html suffix from product URLs, use the following cURL command:


curl 'https://hub.feefo.com/api/magentoV2' -d '{
    "magentoV2": {
        "accessToken": "ACCESSTOKENPROVIDEDBYMERCHANT",
        "merchantId": "MERCHANTIDFROMGCP",
        "hostUrl": "HTTPSURLFROMMERCHANT",
        "schedulePeriod": "Daily",
        "username": "EMAILADDRESSOFUSERWHOCREATEDACCESSTOKEN",
        "excludeProductUrlSuffix": "true",
        "password": "N/A",
        "storeIds": ["1"]
    }
}'

Troubleshooting Common Issues


If your attempt to connect to the Magento API fails, you may see the following error message:



This generic message indicates that the connection could not be confirmed. Possible reasons include:


Expired Access Token: Ensure your access token is still valid.

User Permissions: Verify that the user who created the access token is both a user and an admin in Feefo.

IP Whitelisting: Feefo's IP addresses need to be whitelisted to connect to the Magento Rest API.


IP Whitelisting


Even with correct IP whitelisting, connections may still fail. This is because Feefo's K8 Cluster sends requests from dynamic IP addresses that cannot be whitelisted. If IP whitelisting is enabled on Magento, the connection test will fail.


Resolution Options


Disable IP Whitelisting: Request that IP whitelisting be disabled for the your domain.

Manual Data Source Creation: Raise a request for the Feefo Support to manually create the data source in the datastore, bypassing the connection test.


By following these steps, you can successfully integrate Magento with Feefo using cURL commands. For further assistance, please contact Feefo support.