POST api/Food/UpdateFoodItemListing

Request Information

URI Parameters

None.

Body Parameters

U_Listing
NameDescriptionTypeAdditional information
ListingID

integer

Required

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

FoodID

integer

Required

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

ScheduleID

integer

Required

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

FoodDays

Collection of Days

Required

StartTime

date

Required

Data type: Time

EndTime

date

Required

Data type: Time

NickName

string

Required

MaxQuantity

integer

Required

Range: inclusive between 10 and 250

LeadTime

integer

Required

Range: inclusive between 0 and 24

DelivaryFee

decimal number

Required

Data type: Currency

Range: inclusive between 0 and 50

ListingPortionPrice

Collection of W_ListItemPrice

None.

DeliverMethod

DeliverMethod

Required

Request Formats

application/json, text/json

Sample:
{
  "listingID": 1,
  "foodID": 2,
  "scheduleID": 3,
  "foodDays": [
    "SUNDAY",
    "SUNDAY"
  ],
  "startTime": "2019-07-21T00:41:52.3695644-07:00",
  "endTime": "2019-07-21T00:41:52.3695644-07:00",
  "nickName": "sample string 6",
  "maxQuantity": 7,
  "leadTime": 8,
  "delivaryFee": 9.0,
  "listingPortionPrice": [
    {
      "portionSize": "SMALL",
      "listItemPrice": 1.0
    },
    {
      "portionSize": "SMALL",
      "listItemPrice": 1.0
    }
  ],
  "deliverMethod": "ALL"
}

application/xml, text/xml

Sample:
<U_Listing xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PGDataStructures">
  <DelivaryFee>9</DelivaryFee>
  <DeliverMethod>ALL</DeliverMethod>
  <EndTime>2019-07-21T00:41:52.3695644-07:00</EndTime>
  <FoodDays xmlns:d2p1="http://schemas.datacontract.org/2004/07/System">
    <d2p1:Days>SUNDAY</d2p1:Days>
    <d2p1:Days>SUNDAY</d2p1:Days>
  </FoodDays>
  <FoodID>2</FoodID>
  <LeadTime>8</LeadTime>
  <ListingPortionPrice>
    <W_ListItemPrice>
      <ListItemPrice>1</ListItemPrice>
      <PortionSize>SMALL</PortionSize>
    </W_ListItemPrice>
    <W_ListItemPrice>
      <ListItemPrice>1</ListItemPrice>
      <PortionSize>SMALL</PortionSize>
    </W_ListItemPrice>
  </ListingPortionPrice>
  <MaxQuantity>7</MaxQuantity>
  <NickName>sample string 6</NickName>
  <ScheduleID>3</ScheduleID>
  <StartTime>2019-07-21T00:41:52.3695644-07:00</StartTime>
  <ListingID>1</ListingID>
</U_Listing>

multipart/form-data

Sample:
<U_Listing xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PGDataStructures"><DelivaryFee>9</DelivaryFee><DeliverMethod>ALL</DeliverMethod><EndTime>2019-07-21T00:41:52.3695644-07:00</EndTime><FoodDays xmlns:d2p1="http://schemas.datacontract.org/2004/07/System"><d2p1:Days>SUNDAY</d2p1:Days><d2p1:Days>SUNDAY</d2p1:Days></FoodDays><FoodID>2</FoodID><LeadTime>8</LeadTime><ListingPortionPrice><W_ListItemPrice><ListItemPrice>1</ListItemPrice><PortionSize>SMALL</PortionSize></W_ListItemPrice><W_ListItemPrice><ListItemPrice>1</ListItemPrice><PortionSize>SMALL</PortionSize></W_ListItemPrice></ListingPortionPrice><MaxQuantity>7</MaxQuantity><NickName>sample string 6</NickName><ScheduleID>3</ScheduleID><StartTime>2019-07-21T00:41:52.3695644-07:00</StartTime><ListingID>1</ListingID></U_Listing>

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

Response Information

Resource Description

DBStatus
NameDescriptionTypeAdditional information
Type

DBOperation

None.

Message

Collection of DBMessageType

None.

InnerException

Collection of string

None.

Response Formats

application/json, text/json

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

application/xml, text/xml

Sample:
<DBStatus 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>
</DBStatus>

multipart/form-data

Sample:
<DBStatus 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></DBStatus>