How to connect Shopline to API2Cart?
To connect the Shopline store to the API2Cart, you need to specify one of the available sets of credentials.

Credentials set 0 (shopline_access_token) is used for adding a Private App.
Credentials set 1 (shopline_app_key + shopline_app_secret) is used for adding a Public App or a Custom App.
The process of obtaining access for Private App:
-
Go to the Apps section in the store's admin panel and click on 'Develop Apps'
-
Click on ‘Create an APP'
Then fill in the required information
-
Go to the app editing page
Then configure the permissions for the Admin API
To add the store to the API, in addition to the permissions for the relevant resources (read/write orders, products, customers, etc.), it is also mandatory to specify 'Read store information'.
-
Next, go to the API Certificates tab and install the app on the store
After this, you will receive the shopline_access_token
Please note that this token is valid for 3 years. After its expiration, you will need to update it in the app panel and update the shopline_access_token value for API2Cart.
-
Fill in the required information for the API2Cart
The process of obtaining access for Public App or Custom App:
-
Create the app according to the Shopline's instructions.
Use this guide for Public Apps.
Use this guide for Custom Apps.
-
After creating the app, you will receive the shopline_app_key and shopline_app_secret, which are used for adding to the API2Cart.
Note that for all stores where the app will be installed, the shopline_app_key and shopline_app_secret will be the same, with only the store_url differing.
-
Next, you need to install the app on the store. To do this, you need to prepare a URL through which customers will install your app
curl --location 'https://<handle>.myshopline.com/admin/oauth-web/#/oauth/authorize?appKey=<app_key>&responseType=code&scope=<scopes>&redirectUri=<redirect_uri>'
where handle is the unique store identifier (the store URL subdomain), app_key is the App Key from the previous step, scope is the list of permissions required by the app (the list of scopes can be found here), and redirect_uri is the App callback URL from the app dashboard.
- After this, the client, on whose store the app will be installed, needs to go to the provided link in the browser and confirm the app installation.
-
Once the client has installed the app, you can add the store to the API2Сart