How to Create API in OpenCart

Posted on March 30th, 2017

API is very useful if you want to manage the data on your site remotely from a customized panel. With the help of API, you can significantly decrease the overall repetitive workload as you can fire multiple API endpoints to perform multiple steps in series.

For example, Let’s say you want to add a product and promote it with E-mail marketing. For this to happen, you have to perform multiple steps. The first step is to add the product to your URL and then execute the E-mail marketing campaign directly from your code.

In short, with the help of API, you can automate the repetitive tasks very easily. Or, Let’s say you want to validate and add thousands of products to your site. With the help of API, you can do it with ease. Or, you can provide API to some of your major customers.

In this tutorial, I will show you How to create a new API token directly from the admin panel of your OpenCart store. It is a very easy process and it takes only a few minutes to create a new API token. So, Let’s get started.

Create API in OpenCart

To create a new API, log in to the admin panel of your OpenCart store and click on theĀ System -> Users -> API option given in the left sidebar. Refer to the following screenshot for better understanding.

API

On this page, you will see a list of APIs available in your store. You can also edit or manage API keys from this interface. To create a new API, click on the “+” button given at the top-right corner of the page.

API

Now, Enter the basic information like API name, and API key. You can also generate the API token randomly which is a good method to go.

You can also set the current status of that API. You can enable or disable it from the drop-down given in the API creation form.

API

After filling up all the required information, click on theĀ Save button represented by a floppy disk on the top-right corner of the page just like the following image.

Create API

So, this is how you can create a new API in OpenCart. If you are providing API tokens to your customers, make sure they are not abusing it. You can easily disable API if it is abused.

If you have any questions regarding this tutorial or the topic, please let us know in the comment section given below. We are happy to help!

4 Responses to “How to Create API in OpenCart”

  1. uday says:

    how to register new customer in my opencart project using given api

  2. Edoziem Solomon Chidiebere says:

    Good day, please where or how can I get the consumer key and consumer secret of my opencart store, I try connecting knawat extension with my opencart store but it’s popping out errors, saying “Invalid consumer key” Invalid consumer secret” please how do I get this credentials. I will greatly appreciate if a support is granted, thank you so much.

  3. vijay says:

    how to insert api in opencart which are provided by shipping companies like easyship, ezyslips

Leave a Reply