GET api/Product/{id}

Returns a product in json format. Has one paramater called id eg: ~/api/product/316

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

Unique int type Identity Column

integer

Required

Body Parameters

None.

Response Information

Resource Description

Product

Product
NameDescriptionTypeAdditional information
ProductID

Product ID

integer

None.

Name

Product Name

string

None.

ProductNumber

Product Number

string

None.

MakeFlag

MakeFlag

boolean

None.

FinishedGoodsFlag

FinishedGoodsFlag

boolean

None.

Color

Color

string

None.

SafetyStockLevel

SafetyStockLevel

integer

None.

ReorderPoint

ReorderPoint

integer

None.

StandardCost

StandardCost

decimal number

None.

ListPrice

ListPrice

decimal number

None.

Size

Size

string

None.

SizeUnitMeasureCode

SizeUnitMeasureCode

string

None.

WeightUnitMeasureCode

WeightUnitMeasureCode

string

None.

Weight

Weight

decimal number

None.

DaysToManufacture

DaysToManufacture

integer

None.

ProductLine

ProductLine

string

None.

Class

Class

string

None.

Style

Style

string

None.

ProductSubcategoryID

ProductSubcategoryID

integer

None.

ProductModelID

ProductModelID

integer

None.

SellStartDate

SellStartDate

date

None.

SellEndDate

SellEndDate

date

None.

DiscontinuedDate

DiscontinuedDate

date

None.

rowguid

rowguid

globally unique identifier

None.

ModifiedDate

ModifiedDate

date

None.

Response Formats

application/json, text/json

Sample:
{
  "ProductID": 1,
  "Name": "sample string 2",
  "ProductNumber": "sample string 3",
  "MakeFlag": true,
  "FinishedGoodsFlag": true,
  "Color": "sample string 4",
  "SafetyStockLevel": 1,
  "ReorderPoint": 1,
  "StandardCost": 1.0,
  "ListPrice": 1.0,
  "Size": "sample string 5",
  "SizeUnitMeasureCode": "sample string 6",
  "WeightUnitMeasureCode": "sample string 7",
  "Weight": 1.0,
  "DaysToManufacture": 1,
  "ProductLine": "sample string 8",
  "Class": "sample string 9",
  "Style": "sample string 10",
  "ProductSubcategoryID": 1,
  "ProductModelID": 1,
  "SellStartDate": "2019-03-24T13:01:21.9710176-04:00",
  "SellEndDate": "2019-03-24T13:01:21.9710176-04:00",
  "DiscontinuedDate": "2019-03-24T13:01:21.9710176-04:00",
  "rowguid": "6c652bba-cc8a-41cc-91b7-e6e5c4370a56",
  "ModifiedDate": "2019-03-24T13:01:21.9710176-04:00"
}

text/html

Sample:
{"ProductID":1,"Name":"sample string 2","ProductNumber":"sample string 3","MakeFlag":true,"FinishedGoodsFlag":true,"Color":"sample string 4","SafetyStockLevel":1,"ReorderPoint":1,"StandardCost":1.0,"ListPrice":1.0,"Size":"sample string 5","SizeUnitMeasureCode":"sample string 6","WeightUnitMeasureCode":"sample string 7","Weight":1.0,"DaysToManufacture":1,"ProductLine":"sample string 8","Class":"sample string 9","Style":"sample string 10","ProductSubcategoryID":1,"ProductModelID":1,"SellStartDate":"2019-03-24T13:01:21.9710176-04:00","SellEndDate":"2019-03-24T13:01:21.9710176-04:00","DiscontinuedDate":"2019-03-24T13:01:21.9710176-04:00","rowguid":"6c652bba-cc8a-41cc-91b7-e6e5c4370a56","ModifiedDate":"2019-03-24T13:01:21.9710176-04:00"}

application/xml, text/xml

Sample:
<Product xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ApiTest.Models.DbContext">
  <Class>sample string 9</Class>
  <Color>sample string 4</Color>
  <DaysToManufacture>1</DaysToManufacture>
  <DiscontinuedDate>2019-03-24T13:01:21.9710176-04:00</DiscontinuedDate>
  <FinishedGoodsFlag>true</FinishedGoodsFlag>
  <ListPrice>1</ListPrice>
  <MakeFlag>true</MakeFlag>
  <ModifiedDate>2019-03-24T13:01:21.9710176-04:00</ModifiedDate>
  <Name>sample string 2</Name>
  <ProductID>1</ProductID>
  <ProductLine>sample string 8</ProductLine>
  <ProductModelID>1</ProductModelID>
  <ProductNumber>sample string 3</ProductNumber>
  <ProductSubcategoryID>1</ProductSubcategoryID>
  <ReorderPoint>1</ReorderPoint>
  <SafetyStockLevel>1</SafetyStockLevel>
  <SellEndDate>2019-03-24T13:01:21.9710176-04:00</SellEndDate>
  <SellStartDate>2019-03-24T13:01:21.9710176-04:00</SellStartDate>
  <Size>sample string 5</Size>
  <SizeUnitMeasureCode>sample string 6</SizeUnitMeasureCode>
  <StandardCost>1</StandardCost>
  <Style>sample string 10</Style>
  <Weight>1</Weight>
  <WeightUnitMeasureCode>sample string 7</WeightUnitMeasureCode>
  <rowguid>6c652bba-cc8a-41cc-91b7-e6e5c4370a56</rowguid>
</Product>