POST api/stocktransfer/Create
Creates a new stock transfer.
Request Information
URI Parameters
None.
Body Parameters
The stock transfer object to be created.
StockTransferRequest| Name | Description | Type | Additional information |
|---|---|---|---|
| Lines | Collection of StockTransferLinePostRequest |
Required |
|
| Status | StockTransferStatus |
None. |
|
| WmsStatus | WMSStatus |
None. |
|
| 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. |
|
| CreatedByUsername | string |
Required Max length: 255 |
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 id on an 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
None.
Request Formats
application/json, text/json
{
"Lines": [
{
"LineNumber": 1,
"Status": 1,
"ArticleNumber": 2,
"SenderStockId": "f1374830-746a-4c67-a244-5e70e2e000db",
"ReceiverStockId": "8bbf1fba-b8c4-4005-bf2e-e56e67bdb9d8",
"Quantity": 5.0,
"Description": "sample string 6",
"Note": "sample string 7"
},
{
"LineNumber": 1,
"Status": 1,
"ArticleNumber": 2,
"SenderStockId": "f1374830-746a-4c67-a244-5e70e2e000db",
"ReceiverStockId": "8bbf1fba-b8c4-4005-bf2e-e56e67bdb9d8",
"Quantity": 5.0,
"Description": "sample string 6",
"Note": "sample string 7"
}
],
"Status": 1,
"WmsStatus": 1,
"ReceiverBranchId": 1,
"SenderBranchId": 2,
"OrderDate": "2026-01-21 22:49:44",
"Note": "sample string 4",
"Express": true,
"PreSeason": true,
"CarrierId": 1,
"DeliveryDate": "2026-01-21 22:49:44",
"TransportationScheduleId": 1,
"CreatedByUsername": "sample string 7"
}
application/xml, text/xml
<StockTransferRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Compilator.DDAPI.DTO.Stock">
<CarrierId>1</CarrierId>
<CreatedByUsername>sample string 7</CreatedByUsername>
<DeliveryDate>2026-01-21T22:49:44.3297311+01:00</DeliveryDate>
<Express>true</Express>
<Note>sample string 4</Note>
<OrderDate>2026-01-21T22:49:44.3297311+01:00</OrderDate>
<PreSeason>true</PreSeason>
<ReceiverBranchId>1</ReceiverBranchId>
<SenderBranchId>2</SenderBranchId>
<Status>Open</Status>
<TransportationScheduleId>1</TransportationScheduleId>
<WmsStatus>NotSent</WmsStatus>
<Lines>
<StockTransferLinePostRequest>
<ArticleNumber>2</ArticleNumber>
<Description>sample string 6</Description>
<LineNumber>1</LineNumber>
<Note>sample string 7</Note>
<Quantity>5</Quantity>
<ReceiverStockId>8bbf1fba-b8c4-4005-bf2e-e56e67bdb9d8</ReceiverStockId>
<SenderStockId>f1374830-746a-4c67-a244-5e70e2e000db</SenderStockId>
<Status>Open</Status>
</StockTransferLinePostRequest>
<StockTransferLinePostRequest>
<ArticleNumber>2</ArticleNumber>
<Description>sample string 6</Description>
<LineNumber>1</LineNumber>
<Note>sample string 7</Note>
<Quantity>5</Quantity>
<ReceiverStockId>8bbf1fba-b8c4-4005-bf2e-e56e67bdb9d8</ReceiverStockId>
<SenderStockId>f1374830-746a-4c67-a244-5e70e2e000db</SenderStockId>
<Status>Open</Status>
</StockTransferLinePostRequest>
</Lines>
</StockTransferRequest>
application/x-www-form-urlencoded
Sample not available.
Response Information
Resource Description
An object containing ids for WMS and the actual stock transfer. A Success property is set to false if something is wrong and a list of all the errors is supplied.
StockTransferPostResponse| Name | Description | Type | Additional information |
|---|---|---|---|
| Id | integer |
None. |
|
| Success | boolean |
None. |
|
| WmsId | integer |
None. |
|
| Messages | Collection of StockTransferMessage |
None. |
Response Formats
application/json, text/json
Sample not available.