POST api/RecipeElements

Request Information

URI Parameters

None.

Body Parameters

RecipeElement
NameDescriptionTypeAdditional information
id

integer

None.

recipeId

integer

Required

itemId

integer

Required

warehouseId

integer

Required

quantity

decimal number

Required

unit

string

Required

companyData

CompanyData

None.

Request Formats

application/json, text/json

Sample:
{
  "id": 1,
  "recipeId": 2,
  "itemId": 3,
  "warehouseId": 4,
  "quantity": 5.0,
  "unit": "sample string 6",
  "companyData": {
    "companyName": "sample string 1",
    "databaseName": "sample string 2"
  }
}

application/xml, text/xml

Sample:
<RecipeElement xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebApiOptima_v._2._0.Models">
  <companyData>
    <companyName>sample string 1</companyName>
    <databaseName>sample string 2</databaseName>
  </companyData>
  <id>1</id>
  <itemId>3</itemId>
  <quantity>5</quantity>
  <recipeId>2</recipeId>
  <unit>sample string 6</unit>
  <warehouseId>4</warehouseId>
</RecipeElement>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'RecipeElement'.

Response Information

Resource Description

IHttpActionResult

None.

Response Formats

application/json, text/json, application/xml, text/xml

Sample:

Sample not available.