POST api/Chef/InsertRegion

Request Information

URI Parameters

None.

Body Parameters

W_Region
NameDescriptionTypeAdditional information
RegionNickName

string

Required

String length: inclusive between 1 and 50

Polygon

Collection of W_LocationCordinates

Required

Request Formats

application/json, text/json

Sample:
{
  "regionNickName": "sample string 1",
  "polygon": [
    {
      "latitude": 1.1,
      "longitude": 2.1
    },
    {
      "latitude": 1.1,
      "longitude": 2.1
    }
  ]
}

application/xml, text/xml

Sample:
<W_Region xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PGDataStructures">
  <Polygon>
    <W_LocationCordinates>
      <latitude>1.1</latitude>
      <longitude>2.1</longitude>
    </W_LocationCordinates>
    <W_LocationCordinates>
      <latitude>1.1</latitude>
      <longitude>2.1</longitude>
    </W_LocationCordinates>
  </Polygon>
  <RegionNickName>sample string 1</RegionNickName>
</W_Region>

multipart/form-data

Sample:
<W_Region xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PGDataStructures"><Polygon><W_LocationCordinates><latitude>1.1</latitude><longitude>2.1</longitude></W_LocationCordinates><W_LocationCordinates><latitude>1.1</latitude><longitude>2.1</longitude></W_LocationCordinates></Polygon><RegionNickName>sample string 1</RegionNickName></W_Region>

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

Response Information

Resource Description

DBStatusWithLastKey
NameDescriptionTypeAdditional information
LastUpdatedKey

integer

None.

Type

DBOperation

None.

Message

Collection of DBMessageType

None.

InnerException

Collection of string

None.

Response Formats

application/json, text/json

Sample:
{
  "lastUpdatedKey": 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>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>1</LastUpdatedKey></DBStatusWithLastKey>