REST or RESTful API design is an abbreviation of Representational state transfer which essentially refers to a style of web architecture and is designed to take advantage of existing protocols.

An API can be considered RESTful if it has the below features:
1) Client–server : Where client handles the front end and server handles the backend
2) Stateless : No client data is stored on the server.
3) Cacheable : like browsers caching static elements of a web page, Clients can cache response to improve performance.

A REST API or is an application program interface (API) that uses HTTP requests to GET, PUT, POST and DELETE data using JSON format. RESTful API lets us to interact with Parse from anything that can send an HTTP request.

REST API was defined by Dr. Roy in 2000.
WooCommerce is a ecommerce solution for WordPres. WooCommerce provides REST Api and has a set of Representational State Transfer (REST) API endpoints
WooCommerce intruced REST API in version 2.1, where it allows to create, read, update and delete using JSON format.To use REST API in WooCommerce your WooCommerce instalation must be 2.1 or newer.

Now how to use REST API in WooCommerce. Follow the following steps to enable REST API in WooCommerce.

Step 1: Login to your site admin

Step 2: WooCommerce > Settings > API then click on Settings, some time or in latest versions of WooCommerce you can find it in advance tab or WooCommerce > Settings > Advance -> REST API

Step 3: Click Enable the REST API check box

Step 4: Save Changes
Next, click on Keys/Apps to generate a unique API key that will serve as the secret password to connecting to the REST API. Keep in mind to select the required permission for your API i.e Read, Write, Read/Write.

Click on generate API Key button to generate API Key. This API key will be required to authenticate the API in your application.
In the next article I will describe all the things with live example.

Thank you for reading the post

Leave comment

Your email address will not be published. Required fields are marked with *.