Products Webapp (1.0.0)

Download OpenAPI specification:Download

Products

Display all products.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Delete products.

Request Body schema: application/json
ids
Array of arrays

Responses

Request samples

Content type
application/json
{
  • "ids": [
    ]
}

Response samples

Content type
application/json
{
  • "message": "Products deleted successfully."
}

Store a newly created resource in storage.

Request Body schema: application/json
required

Product data

weight
integer <int64> (Weight)

Weight

id
integer <int64> (ID)

ID

name
required
string (Name)

Name

sku
required
string (SKU)

SKU

price
required
integer <int64> (Price)

Price

type
required
string (Type)
Enum: "book" "dvd" "furniture"

Type

size
integer <int64> (Size)

Size

length
integer <int64> (Length)

Length

height
integer <int64> (Height)

Height

width
integer <int64> (Width)

Width

Responses

Request samples

Content type
application/json
{
  • "weight": 200,
  • "id": 1,
  • "name": "Test",
  • "sku": "TestProduct001",
  • "price": 200,
  • "type": "book",
  • "size": 7,
  • "length": 3.2,
  • "height": 1.2,
  • "width": 7
}

Response samples

Content type
application/json
{
  • "message": "Product created successfully",
  • "data": {
    }
}

Get a product.

query Parameters
sku
string

Responses

Response samples

Content type
application/json
{
  • "weight": 200,
  • "id": 1,
  • "name": "Test",
  • "sku": "TestProduct001",
  • "price": 200,
  • "type": "book"
}