POST api/StockTransfers
[DEPRECATED] Adds a stock transfer.
Request Information
URI Parameters
None.
Body Parameters
Stock transfer.
StockTransferHeadRequest| Name | Description | Type | Additional information |
|---|---|---|---|
| ReceiverBranchId | integer |
Required |
|
| SenderBranchId | integer |
Required |
|
| OrderDate | date |
Required |
|
| Note | string |
Max length: 255 |
|
| Express | boolean |
Required |
|
| PreSeason | boolean |
Required |
|
| CarrierId | integer |
None. |
|
| DeliveryDate | date |
None. |
|
| TransportationScheduleId | integer |
None. |
|
| StockTransferLines | Collection of StockTransferLineRequest |
Required |
Remarks
Receiver or sending branch must be a central warehouse branch.
The transporting options for the stock transfer are as follows:
If a transportation schedule is supplied it is used. A transportation schedule overrides any carrier and delivery date specified.
Carrier and delivery date are used if supplied with the stock transfer.
If no transportation scheduler and no carrier with delivery date are supplied then the default transportation schedule for receiving branch are used.
Errors are returned and the stock transfer is not saved when the following occurs:
1. The stock transfer does not contain any order lines.
2. Branch id for receiver or sender is not found.
3. Invalid stock number on an order line.
4. The tranportation schedule id is not found.
5. The carrier id is not found.
6. If a required field is ignored or a string properties max length is violated.
7. If a general error should occur.
Example
//Adds a stock transfer, the body should contain a StockTransferHeadRequest
POST: http://localhost/api/stocktransfers/
Request Formats
application/json, text/json
{
"ReceiverBranchId": 1,
"SenderBranchId": 2,
"OrderDate": "2026-01-21 22:49:43",
"Note": "sample string 4",
"Express": true,
"PreSeason": true,
"CarrierId": 1,
"DeliveryDate": "2026-01-21 22:49:43",
"TransportationScheduleId": 1,
"StockTransferLines": [
{
"LineId": 1,
"ArticleNumber": 2,
"SenderStockNumber": 3,
"ReceiverStockNumber": 4,
"Quantity": 5.0,
"Description": "sample string 6",
"Note": "sample string 7"
},
{
"LineId": 1,
"ArticleNumber": 2,
"SenderStockNumber": 3,
"ReceiverStockNumber": 4,
"Quantity": 5.0,
"Description": "sample string 6",
"Note": "sample string 7"
}
]
}
application/xml, text/xml
<StockTransferHeadRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Compilator.DDAPI.DTO.Stock">
<CarrierId>1</CarrierId>
<DeliveryDate>2026-01-21T22:49:43.2962999+01:00</DeliveryDate>
<Express>true</Express>
<Note>sample string 4</Note>
<OrderDate>2026-01-21T22:49:43.2962999+01:00</OrderDate>
<PreSeason>true</PreSeason>
<ReceiverBranchId>1</ReceiverBranchId>
<SenderBranchId>2</SenderBranchId>
<StockTransferLines>
<StockTransferLineRequest>
<ArticleNumber>2</ArticleNumber>
<Description>sample string 6</Description>
<LineId>1</LineId>
<Note>sample string 7</Note>
<Quantity>5</Quantity>
<ReceiverStockNumber>4</ReceiverStockNumber>
<SenderStockNumber>3</SenderStockNumber>
</StockTransferLineRequest>
<StockTransferLineRequest>
<ArticleNumber>2</ArticleNumber>
<Description>sample string 6</Description>
<LineId>1</LineId>
<Note>sample string 7</Note>
<Quantity>5</Quantity>
<ReceiverStockNumber>4</ReceiverStockNumber>
<SenderStockNumber>3</SenderStockNumber>
</StockTransferLineRequest>
</StockTransferLines>
<TransportationScheduleId>1</TransportationScheduleId>
</StockTransferHeadRequest>
application/x-www-form-urlencoded
Sample not available.
Response Information
Resource Description
Object contraing data if success.
integerResponse Formats
application/json, text/json
1
application/xml, text/xml
<long xmlns="http://schemas.microsoft.com/2003/10/Serialization/">1</long>