In order to create a new product, the user needs to enter the name (ProductName), type (ProductType) and price (Price) of the product.

URL:

https://base-project-testing-dot-eshopbox-test-project.el.r.appspot.com/_ah/api/esb/v1/arpita/create

Sample Request Format: JSON (POST Request)

{
   "ProductName": "Shirt",
   "ProductType": "Formal",
   "Price": "900"
}

Product Id is automatically incremented, therefore it should not be specified in the input request by the user.

Variable Description (Endpoint)

Variable

Type

Description

req

Map <String, Object>

Stores the JSON input request from the user

item2

Object

Used to call the methods in SaveItemsService class

mp

Map <String, Object>

Stores the API response which is returned to the user.

flag

int

Stores the called function’s return value. Its main purpose is error handling. (For the developer)

e

Exception

Used for exception handling

Program Work-Flow

Sample Response

Status

Feel free to leave any suggestions or comments below!