POST api/Food/InsertFoodItem

Request Information

URI Parameters

None.

Body Parameters

W_Food_Item
NameDescriptionTypeAdditional information
FoodItemEthnicityName

string

Required

FoodImageID

integer

Required

Matching regular expression pattern: ^[0-9]{1,11}$

FoodItemTypeName

string

Required

FoodItemKitchenID

integer

Required

Matching regular expression pattern: ^[0-9]{1,11}$

FoodItemName

string

Required

FoodItemDescription

string

Required

FoodItemStorage

string

Required

FoodItemWarnings

string

Required

Ingrediants

string

Required

SpicyLevel

integer

Required

FoodItemLife

integer

Required

FoodItemOtherInfo

string

Required

FoodCollectionNameID

integer

Required

Matching regular expression pattern: ^[0-9]{1,11}$

Request Formats

application/json, text/json

Sample:
{
  "foodItemEthnicityName": "sample string 1",
  "foodImageID": 2,
  "foodItemTypeName": "sample string 3",
  "foodItemKitchenID": 4,
  "foodItemName": "sample string 5",
  "foodItemDescription": "sample string 6",
  "foodItemStorage": "sample string 7",
  "foodItemWarnings": "sample string 8",
  "ingrediants": "sample string 9",
  "spicyLevel": 10,
  "foodItemLife": 11,
  "foodItemOtherInfo": "sample string 12",
  "foodCollectionNameID": 13
}

application/xml, text/xml

Sample:
<W_Food_Item xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PGDataStructures">
  <FoodCollectionNameID>13</FoodCollectionNameID>
  <FoodImageID>2</FoodImageID>
  <FoodItemDescription>sample string 6</FoodItemDescription>
  <FoodItemEthnicityName>sample string 1</FoodItemEthnicityName>
  <FoodItemKitchenID>4</FoodItemKitchenID>
  <FoodItemLife>11</FoodItemLife>
  <FoodItemName>sample string 5</FoodItemName>
  <FoodItemOtherInfo>sample string 12</FoodItemOtherInfo>
  <FoodItemStorage>sample string 7</FoodItemStorage>
  <FoodItemTypeName>sample string 3</FoodItemTypeName>
  <FoodItemWarnings>sample string 8</FoodItemWarnings>
  <Ingrediants>sample string 9</Ingrediants>
  <SpicyLevel>10</SpicyLevel>
</W_Food_Item>

multipart/form-data

Sample:
<W_Food_Item xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PGDataStructures"><FoodCollectionNameID>13</FoodCollectionNameID><FoodImageID>2</FoodImageID><FoodItemDescription>sample string 6</FoodItemDescription><FoodItemEthnicityName>sample string 1</FoodItemEthnicityName><FoodItemKitchenID>4</FoodItemKitchenID><FoodItemLife>11</FoodItemLife><FoodItemName>sample string 5</FoodItemName><FoodItemOtherInfo>sample string 12</FoodItemOtherInfo><FoodItemStorage>sample string 7</FoodItemStorage><FoodItemTypeName>sample string 3</FoodItemTypeName><FoodItemWarnings>sample string 8</FoodItemWarnings><Ingrediants>sample string 9</Ingrediants><SpicyLevel>10</SpicyLevel></W_Food_Item>

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 'W_Food_Item'.

Response Information

Resource Description

DBStatusWithLastKey
NameDescriptionTypeAdditional information
LastUpdatedKey

string

None.

Type

DBOperation

None.

Message

Collection of DBMessageType

None.

InnerException

Collection of string

None.

Response Formats

application/json, text/json

Sample:
{
  "lastUpdatedKey": "sample string 1",
  "type": "ERROR",
  "message": [
    "SUCCESSFULLY_DATA_INSERTED",
    "SUCCESSFULLY_DATA_INSERTED"
  ],
  "innerException": [
    "sample string 1",
    "sample string 2"
  ]
}

application/xml, text/xml

Sample:
<DBStatusWithLastKey xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PGDataStructures">
  <InnerException xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>sample string 1</d2p1:string>
    <d2p1:string>sample string 2</d2p1:string>
  </InnerException>
  <Message xmlns:d2p1="http://schemas.datacontract.org/2004/07/DBEnumStructure">
    <d2p1:DBMessageType>SUCCESSFULLY_DATA_INSERTED</d2p1:DBMessageType>
    <d2p1:DBMessageType>SUCCESSFULLY_DATA_INSERTED</d2p1:DBMessageType>
  </Message>
  <Type>ERROR</Type>
  <LastUpdatedKey>sample string 1</LastUpdatedKey>
</DBStatusWithLastKey>

multipart/form-data

Sample:
<DBStatusWithLastKey xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PGDataStructures"><InnerException xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"><d2p1:string>sample string 1</d2p1:string><d2p1:string>sample string 2</d2p1:string></InnerException><Message xmlns:d2p1="http://schemas.datacontract.org/2004/07/DBEnumStructure"><d2p1:DBMessageType>SUCCESSFULLY_DATA_INSERTED</d2p1:DBMessageType><d2p1:DBMessageType>SUCCESSFULLY_DATA_INSERTED</d2p1:DBMessageType></Message><Type>ERROR</Type><LastUpdatedKey>sample string 1</LastUpdatedKey></DBStatusWithLastKey>