PUT api/Products

Updates an existing Products entity

Request Information

URI Parameters

None.

Body Parameters

ProductsData
NameDescriptionTypeAdditional information
ProductID

integer

None.

ProductName

string

None.

SupplierID

integer

None.

CategoryID

integer

None.

QuantityPerUnit

string

None.

UnitPrice

decimal number

None.

UnitsInStock

integer

None.

UnitsOnOrder

integer

None.

ReorderLevel

integer

None.

Discontinued

boolean

None.

Request Formats

application/json, text/json

Sample:
{
  "ProductID": 1,
  "ProductName": "sample string 2",
  "SupplierID": 3,
  "CategoryID": 4,
  "QuantityPerUnit": "sample string 5",
  "UnitPrice": 6.0,
  "UnitsInStock": 7,
  "UnitsOnOrder": 8,
  "ReorderLevel": 9,
  "Discontinued": true
}

text/xml

Sample:
<ProductsData xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NorthwindAPI.Models">
  <CategoryID>4</CategoryID>
  <Discontinued>true</Discontinued>
  <ProductID>1</ProductID>
  <ProductName>sample string 2</ProductName>
  <QuantityPerUnit>sample string 5</QuantityPerUnit>
  <ReorderLevel>9</ReorderLevel>
  <SupplierID>3</SupplierID>
  <UnitPrice>6</UnitPrice>
  <UnitsInStock>7</UnitsInStock>
  <UnitsOnOrder>8</UnitsOnOrder>
</ProductsData>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

HttpResponseMessage
NameDescriptionTypeAdditional information
Version

Version

None.

Content

HttpContent

None.

StatusCode

HttpStatusCode

None.

ReasonPhrase

string

None.

Headers

Collection of Object

None.

RequestMessage

HttpRequestMessage

None.

IsSuccessStatusCode

boolean

None.