/
Insert API

Insert API

Insert API for inserting a product in table: prdcts_anshul of schema: integration_engine_staging

Details of product needs to be sent as RAW data in JSON format

API request type and address

The insert API is a HTTP POST method API.

API Address:

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

Key

Required

Data Type

Description

Key

Required

Data Type

Description

product_name

YES

String

Product name

brand

YES

String

Brand of product

weight

YES

Double

Weight of product in kg

mrp

YES

Double

MRP of product

 

Example raw data -

{ "product_name": "Mens Tshirt", "brand": "Levi", "weight": 0.2, "mrp": 2999.99 }

The corresponding entry will look like -

Sequence Diagram

API Response

Case

Response Code

Case

Response Code

Any required field is missing

404 - Resource not found exception

Invalid data input i.e. data not in format of what is expected

400 - Invalid input exception

Product not inserted successfully in database

500 - Internal server error exception

Product successfully inserted in database

201 - Resource created successfully

Exception handling is done in the same order as mentioned above in the table

 

Related content