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| Name | Description | Type | Additional 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": "27289c78-b3d6-4f17-8ba3-b27daeb9c163",
"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>27289c78-b3d6-4f17-8ba3-b27daeb9c163</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:
Response Information
Resource Description
AddStockPlaceResponse| Name | Description | Type | Additional 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>