How to Import Product CSV in Magento2 Enterprise Edition

How to Import Product CSV in Magento2 Enterprise Edition

July 18, 2018 / Eternal Team

Magento has emerged as a very important tool for many categories of business owners. It is quite powerful and helpful in helping a business owner set his/her personal e-commerce store. It has also grown a community and an ecosystem of its own.

Magento is available as:

Community Edition – Can be installed on self-hosted server

Enterprise Edition – Hosted by expert Magento team

This blog post contains all the information that you need to setup Magento Commerce (Enterprise Edition) in your local system and import product listing from a given CSV file.

Basically we need to follow below steps to import products from erp to magento in enterprise edition.

Setup Enterprise edition in local system

Download csv to local server from ftp server and move original csv it to Archive folder

Authenticate REST API through Token authentication

Get list of products using API

Add product to magento API

Update product in magento using API

1. Setup Enterprise edition in local system

We need to follow below steps to setup enterprise edition in our local system.

2. Download csv to local server from ftp server and move csv it to Archive folder

We have used Laravel for Import process. Below is the laravel script to download csv from ftp server and move that csv to archive then.

3. Authenticate REST API through Token authentication

There are 3 types of authentication we can use:

i) Token-based authentication

ii) Session-based authentication

iii) OAuth-based authentication

We have used here Token based authentication.

The token allows Magento to verify that the caller is authorized to access a system resource. To get a token, you must specify the user’s username and password in the request. You need to use following script to create token in PHP.

Note :- make sure username is admin user with proper resources should be assigned.

This token must be specified in the authorization header of every api call that requires admin permissions, like api call to get the list of products, add new product, update existing product or delete product.

4. Get list of products using API

For getting the list of products from magento we can use following API.