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 |
Status for the stock transfer |
StockTransferStatus |
None. |
| WmsStatus |
The WMS status for the stock transfer |
WMSStatus |
None. |
| ReceiverBranchId |
Id of receiving branch. Receiver or sending branch must be a central warehouse branch. |
integer |
Required |
| SenderBranchId |
Id of sending branch. Receiver or sending branch must be a central warehouse branch. |
integer |
Required |
| OrderDate |
Order date. |
date |
Required |
| Note |
Stock transfer note. Maxlength 255 characters. |
string |
Max length: 255 |
| Express |
Indicates if the stock transfer will be sent with WMS express. |
boolean |
Required |
| PreSeason |
Indicates if the stock transfer is a pre season order. |
boolean |
Required |
| CarrierId |
Id of the carrier. Indicates to the WMS system which carrier to use. |
integer |
None. |
| DeliveryDate |
Desired delivery date. Indicates to the WMS system the date of delivery. |
date |
None. |
| TransportationScheduleId |
Id of the transportation schedule to use for the order. If this is set carrier and delivery date are ignored. |
integer |
None. |
| CreatedByUsername |
The name for individual who created the stock transfer. |
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": "1cc8d592-2488-448e-990f-18b2bf8c286b",
"ReceiverStockId": "fd015483-bcf4-4eb9-b6d3-b906f01f3dc1",
"Quantity": 5.0,
"Description": "sample string 6",
"Note": "sample string 7"
},
{
"LineNumber": 1,
"Status": 1,
"ArticleNumber": 2,
"SenderStockId": "1cc8d592-2488-448e-990f-18b2bf8c286b",
"ReceiverStockId": "fd015483-bcf4-4eb9-b6d3-b906f01f3dc1",
"Quantity": 5.0,
"Description": "sample string 6",
"Note": "sample string 7"
}
],
"Status": 1,
"WmsStatus": 1,
"ReceiverBranchId": 1,
"SenderBranchId": 2,
"OrderDate": "12/21/2025 1:01:54 PM",
"Note": "sample string 4",
"Express": true,
"PreSeason": true,
"CarrierId": 1,
"DeliveryDate": "12/21/2025 1:01:54 PM",
"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>2025-12-21T13:01:54.3187974+00:00</DeliveryDate>
<Express>true</Express>
<Note>sample string 4</Note>
<OrderDate>2025-12-21T13:01:54.3187974+00: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>fd015483-bcf4-4eb9-b6d3-b906f01f3dc1</ReceiverStockId>
<SenderStockId>1cc8d592-2488-448e-990f-18b2bf8c286b</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>fd015483-bcf4-4eb9-b6d3-b906f01f3dc1</ReceiverStockId>
<SenderStockId>1cc8d592-2488-448e-990f-18b2bf8c286b</SenderStockId>
<Status>Open</Status>
</StockTransferLinePostRequest>
</Lines>
</StockTransferRequest>
application/x-www-form-urlencoded
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 |
Id of the stock transfer. |
integer |
None. |
| Success |
Indicates if the request was successfull. |
boolean |
None. |
| WmsId |
Id for WMS on the stock transfer. |
integer |
None. |
| Messages |
Is Success is false, then there are error codes and messages in this list |
Collection of StockTransferMessage |
None. |
Response Formats
application/json, text/json
Sample not available.