GET api/Items?categoryID={categoryID}
Retrieves Items based on the provided category ID.
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
categoryID |
The ID of the category to filter the Product Items. |
integer |
Required |
Body Parameters
None.
Response Information
Resource Description
A list of product items matching the provided category ID.
Collection of ItemDetailsName | Description | Type | Additional information |
---|---|---|---|
itemID |
The ID of the item. |
integer |
None. |
itemName |
The name of the item. |
string |
None. |
itemImage |
The image of the item. |
string |
None. |
uploadedAt |
The timestamp when the item was uploaded. |
string |
None. |
address |
The address where the item is located. |
string |
None. |
price |
The price of the item. |
string |
None. |
latitude |
The latitude coordinate of the item's location. |
string |
None. |
longitude |
The longitude coordinate of the item's location. |
string |
None. |
description |
The description of the item. |
string |
None. |
starRatings |
The star review rating of the item, It's an array where each rating captured separately. |
Collection of integer |
None. |
categoryID |
The ID of the category to which the item belongs. |
integer |
None. |
Response Formats
application/json, text/json
Sample:
[ { "itemID": 1, "itemName": "sample string 2", "itemImage": "sample string 3", "uploadedAt": "sample string 4", "address": "sample string 5", "price": "sample string 6", "latitude": "sample string 7", "longitude": "sample string 8", "description": "sample string 9", "starRatings": [ 1, 2 ], "categoryID": 10 }, { "itemID": 1, "itemName": "sample string 2", "itemImage": "sample string 3", "uploadedAt": "sample string 4", "address": "sample string 5", "price": "sample string 6", "latitude": "sample string 7", "longitude": "sample string 8", "description": "sample string 9", "starRatings": [ 1, 2 ], "categoryID": 10 } ]
application/xml, text/xml
Sample:
<ArrayOfItemDetails xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/OTJServices.Models"> <ItemDetails> <address>sample string 5</address> <categoryID>10</categoryID> <description>sample string 9</description> <itemID>1</itemID> <itemImage>sample string 3</itemImage> <itemName>sample string 2</itemName> <latitude>sample string 7</latitude> <longitude>sample string 8</longitude> <price>sample string 6</price> <starRatings xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d3p1:int>1</d3p1:int> <d3p1:int>2</d3p1:int> </starRatings> <uploadedAt>sample string 4</uploadedAt> </ItemDetails> <ItemDetails> <address>sample string 5</address> <categoryID>10</categoryID> <description>sample string 9</description> <itemID>1</itemID> <itemImage>sample string 3</itemImage> <itemName>sample string 2</itemName> <latitude>sample string 7</latitude> <longitude>sample string 8</longitude> <price>sample string 6</price> <starRatings xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d3p1:int>1</d3p1:int> <d3p1:int>2</d3p1:int> </starRatings> <uploadedAt>sample string 4</uploadedAt> </ItemDetails> </ArrayOfItemDetails>