POST api/stockPlace/AddNamedStockPlace

Adds stockplaces with names to a specific stock.

Request Information

URI Parameters

None.

Body Parameters

Request object for adding stockplaces with names

AddNamedStockPlaceRequest
NameDescriptionTypeAdditional information
StockId

StockId of the stock to add stockplaces

globally unique identifier

Required

StockPlaceNames

The list of names to add as stockplaces, the StockPlaceNames.Count is the number of stockplaces that will be added.

Collection of string

Required

Remarks

None.

Example

None.

Request Formats

application/json, text/json

Sample:
{
  "StockId": "8381aaea-fad4-43df-8d5b-2e39478ba4d4",
  "StockPlaceNames": [
    "sample string 1",
    "sample string 2"
  ]
}

application/xml, text/xml

Sample:
<AddNamedStockPlaceRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Compilator.DDAPI.DTO.TyreHotel">
  <StockId>8381aaea-fad4-43df-8d5b-2e39478ba4d4</StockId>
  <StockPlaceNames xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>sample string 1</d2p1:string>
    <d2p1:string>sample string 2</d2p1:string>
  </StockPlaceNames>
</AddNamedStockPlaceRequest>

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

Response Information

Resource Description

AddStockPlaceResponse
NameDescriptionTypeAdditional information
Success

Indicates if the stockplaces were added

boolean

None.

Errors

If is false, there errors will be listed here.

Collection of AddStockPlaceErrorResponse

None.

Response Formats

application/json, text/json

Sample:
{
  "Success": true,
  "Errors": [
    {
      "ErrorMessage": "sample string 1",
      "ErrorCode": 0
    },
    {
      "ErrorMessage": "sample string 1",
      "ErrorCode": 0
    }
  ]
}

application/xml, text/xml

Sample:
<AddStockPlaceResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Compilator.DDAPI.DTO.TyreHotel">
  <Errors>
    <AddStockPlaceErrorResponse>
      <ErrorCode>WrongStockType</ErrorCode>
      <ErrorMessage>sample string 1</ErrorMessage>
    </AddStockPlaceErrorResponse>
    <AddStockPlaceErrorResponse>
      <ErrorCode>WrongStockType</ErrorCode>
      <ErrorMessage>sample string 1</ErrorMessage>
    </AddStockPlaceErrorResponse>
  </Errors>
  <Success>true</Success>
</AddStockPlaceResponse>