Products can be imported programmatically over Application Programming Interface (API), using secured HTTPS protocol.
Following steps have to be done in order to import a product via API:
POSTMAN tool will be used for executing the HTTPS requests to the API as part of this example.
First, an authentication token has to be retrieve in order to manage user's application data.
Getting the token can be done by executing a POST request to /api/v1/auth/login route and providing username and password parameters in the JSON body of the request.
Authentication token will be returned as part of the response. This token can be used to access endpoints that enable management of the user's data.
Product can be created by executing a POST request to the /api/v1/products/create endpoint.
Following attributes should be provided in order to create a simple product:
As mentioned, the access token has to be attached as part of the header in the form "Authorization: bearer <ACCESS_TOKEN>" in order to update the users data.
In POSTMAN, it can be done in following way:
If the request was executed successfully, the product will be visible on the product dashboard.