POST api/StockTransfers

[DEPRECATED] Adds a stock transfer.

Request Information

URI Parameters

None.

Body Parameters

Stock transfer.

StockTransferHeadRequest
NameDescriptionTypeAdditional information
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.
Used in combination with delivery date instead of transportation schedule.
If transportation schedule is given the carrier id is ignored.
For a list of available carriers use http://localhost/api/carriers

integer

None.

DeliveryDate

Desired delivery date. Indicates to the WMS system the date of delivery.
Used in combination with carrier id instead of transportation schedule.
If transportation schedule is given the delivery date is ignored.

date

None.

TransportationScheduleId

Id of the transportation schedule to use for the order. If this is set carrier and delivery date are ignored.
For a list if transportation schedules use http://localhost/api/transportationschedules

integer

None.

StockTransferLines

Stock transfer order lines. At least one order line must be given.

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

Sample:
{
  "ReceiverBranchId": 1,
  "SenderBranchId": 2,
  "OrderDate": "12/21/2025 1:04:07 PM",
  "Note": "sample string 4",
  "Express": true,
  "PreSeason": true,
  "CarrierId": 1,
  "DeliveryDate": "12/21/2025 1:04:07 PM",
  "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

Sample:
<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>2025-12-21T13:04:07.8578024+00:00</DeliveryDate>
  <Express>true</Express>
  <Note>sample string 4</Note>
  <OrderDate>2025-12-21T13:04:07.8578024+00: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:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'StockTransferHeadRequest'.

Response Information

Resource Description

Object contraing data if success.

integer

Response Formats

application/json, text/json

Sample:
1

application/xml, text/xml

Sample:
<long xmlns="http://schemas.microsoft.com/2003/10/Serialization/">1</long>