Skip to content

Item Feature API

Oralita edited this page Feb 8, 2022 · 4 revisions

Body of Item

{
	"itemId": Integer,
	"itemName": String,
	"itemImage": String,
	"itemDescription": String,
	"price": double
}

Get All items in the auction system

[GET] : http://localhost:8080/items pre-require : need to perform authentication

response

[Item]

example

[
	{
		"itemId": 4,
		"itemName": "Some item name",
		"itemImage": "someimage.png",
		"itemDescription": "some description",
		"startPrice": 12.5,
		"endDate": null
	},
	{
		"itemId": 5,
		"itemName": "Some item name2",
		"itemImage": "someimage.png",
		"itemDescription": "some description",
		"startPrice": 12.5,
		"endDate": "2022-02-07T10:55:27.155+00:00"
	}
]

Get Item details

[GET] : http://localhost:8080/items/{itemId} pre-require: need to perform authentication

response

{
	"itemId": Integer,
	"itemName": String,
	"itemImage": String,
	"itemDescription": String,
	"startPrice": double,
	"endDate": TimeStamp
}

example http://localhost:8080/items/5

{
	"itemId": 5,
	"itemName": "Some item name2",
	"itemImage": "someimage.png",
	"itemDescription": "some description",
	"startPrice": 12.5,
	"endDate": "2022-02-07T10:55:27.155+00:00"
}

Post an Items

[POST] : http://localhost:8080/items pre-require: need to perform authentication

body

{
	"itemName": String,
	"itemImage": String,
	"itemDescription": String,
	"startPrice": double,
	"endDate": TimeStamp
}

response Item has been posted

example

{
    "itemName" : "Some item name2",
    "itemImage" : "someimage.png",
    "itemDescription" : "some description",
    "startPrice" : 12.50,
    "endDate" : "2022-02-07T10:55:27.155+00:00"
}
Clone this wiki locally