GET api/Products/{id}

Look up a single product by Product Number

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

Product Number, integer

integer

Required

Body Parameters

None.

Response Information

Resource Description

Product
NameDescriptionTypeAdditional information
ID

integer

None.

Category

string

Required

Matching regular expression pattern: ^[A-Z]+[a-zA-Z''-'\s]*$

String length: inclusive between 0 and 30

Name

string

String length: inclusive between 3 and 60

Price

decimal number

Data type: Currency

Range: inclusive between 0 and 1000

Description

string

None.

Modified

date

Data type: Date

Response Formats

application/json, text/json

Sample:
{
  "ID": 1,
  "Category": "sample string 2",
  "Name": "sample string 3",
  "Price": 4.0,
  "Description": "sample string 5",
  "Modified": "2025-01-22T20:42:39.8705917+00:00"
}

application/xml, text/xml

Sample:
<Product xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AspNetMvcDemo.Models">
  <Category>sample string 2</Category>
  <Description>sample string 5</Description>
  <ID>1</ID>
  <Modified>2025-01-22T20:42:39.8705917+00:00</Modified>
  <Name>sample string 3</Name>
  <Price>4</Price>
</Product>