POST api/StockPlace

Adds stockplaces to a specific stock.

Request Information

URI Parameters

None.

Body Parameters

Request object for adding stockplaces

AddStockPlaceRequest
NameDescriptionTypeAdditional information
StockId

StockId of the stock to add the stockplaces

globally unique identifier

Required

StockPlaceCount

The number of stockplaces to add

integer

Required

Range: inclusive between 1 and 10000

Remarks

None.

Example

None.

Request Formats

application/json, text/json

Sample:
{
  "StockId": "7a9a82ac-085e-405e-a169-143bc8c2ffa7",
  "StockPlaceCount": 2
}

application/xml, text/xml

Sample:
<AddStockPlaceRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Compilator.DDAPI.DTO.TyreHotel">
  <StockId>7a9a82ac-085e-405e-a169-143bc8c2ffa7</StockId>
  <StockPlaceCount>2</StockPlaceCount>
</AddStockPlaceRequest>

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

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>