v1

latestOpenAPI 3.0.3Apache 2.02026-07-1710047196.1 KB
products

Create a new product

Creates a new product entry.

post/products

Request body

namestring

The name of the product

descriptionstring

A brief description of the product

pricenumber

The price of the product

stockinteger

The stock quantity of the product

categorystring

The category of the product

Example request

{
  "name": "Product 1",
  "description": "This is a product",
  "price": 100,
  "stock": 100,
  "category": "Category 1"
}

Response

Product created successfully

statusstring
status_codeinteger

The HTTP status code. Usually 200 , 201, 204 etc

messagestring

A basic message describing a request was processed successfully. example: "Successfully"

Example response

{
  "status": "success",
  "status_code": 201
}