saveInventoryTransfer

Create or update an Inventory Transfer.

Inventory Transfer is a document that moves inventory between locations (stores); subtracts from one location and adds to the other. Inventory Transfer has a list of items and quantities.

Non-stock products and bundles cannot be transfered (these items do not have inventory).

For retrieving Inventory Transfers, see getInventoryTransfers.

Input parameters

Parameter name Description Possible value Required
inventoryTransferID Inventory transfer ID.
Set this parameter to update an existing Inventory Transfer.

If the Erply account has upgraded inventory module (indicated by the (i) signifier at the lower right corner, after version number, in Erply backend), and the transfer is already in confirmed status, it is no longer possible to change:
  • warehouseFromID
  • warehouseToID
  • currencyCode
  • document rows.
API will return error 1017 if you attempt to change any of those fields.
integer
creatorID Employee ID (see getEmployees) — the employee that prepared the Inventory Transfer. integer
warehouseFromID Source location (see getWarehouses). integer yes
warehouseToID Destination location. integer yes
deliveryAddressID Delivery address ID. integer
currencyCode Currency code: EUR, USD. Currency must be present in the system.
If omitted, default currency will be used.
string
type Possible values: TRANSFER, TRANSFER_ORDER. By default TRANSFER.

TRANSFER_ORDER is an "Inventory Transfer Order", or a request for transfering. In Erply backend, it is possible to see Inventory Transfer Orders and turn these into Inventory Transfers.
string
date eg. 2010-01-29
If omitted, current date will be used. Format: yyyy-mm-dd.
string
shippingDate eg. 2010-01-29
Used for inventory transfer order types. Indicates the requested shipping date. Format: yyyy-mm-dd.
string
shippingDateActual eg. 2010-01-29
Used for inventory transfer order types. Indicates the actual shipping date. Format: yyyy-mm-dd.
string
inventoryTransferOrderID Source document ID. integer
status Used only for inventory transfer order types. Accepted values - CREATED, ACCEPTED, REJECTED or FULFILLED. string
reasonID Reason ID. See getReasonCodes. integer
notes string
confirmed By default 1.

Distinction of confirmed and unconfirmed Inventory Transfers is only possible with the upgraded inventory module. In old inventory system, all Inventory Transfers are regarded as "confirmed".
0 or 1
temporaryUUID Optional id value. Used as custom identification on creating new transfers. Can be used as a unique value to identify new transfer creation requests for duplicate requests prevention. A valid value can contain characters a-z+A-Z+0-9, symbols (. and -) and can be maximum of 128 characters long. string
***** Transfer lines (rows).

Send the lines of Inventory Transfer as a flat list, each line defined by the following set of parameters. Replace # with set number (1, 2, 3, ...). For example: productID1, amount1 for the first row, productID2, amount2 for the second one and so on.


When updating an existing document and you do not update the rows, API will keep existing ones as they are. (So, if you only want to edit document creator, you do not need to re-send rows.) However, if row definitions are present, then all rows on the document will be replaced with new ones.
stableRowID# Stable ID of the inventory transfer row. integer
productID# Transfered product. integer yes
amount# Transfered quantity. number yes
price# Unit cost of the transfered item.

If the Erply account has an upgraded inventory module (indicated by the (i) signifier at the lower right corner, after version number, in Erply backend), you do not need to set this field — items are transferred automatically at FIFO cost, and if you attempt to set the cost manually, API will overwrite it anyway.
Decimal
packageID#

Set this field if you want to indicate that the product was transferred as packages. Use it together with "amountOfPackages#".

Packages are product-specific; a product can have zero or more defined packages. To retrieve a product's packages, call getProducts with input parameter getPackageInfo = 1 and see the block productPackages in the output.

To use this field, your account needs to have the "Packages on Inventory Transfers" extra module enabled, otherwise API will return error code 1028. Please contact customer support to enable it.

integer
amountOfPackages#

Amount of packages transfered.

If you specify both amount# and amountOfPackages#, they must correspond to each other: amount# must be equal to amountOfPackages# multiplied by the quantity in one package.

However, it is sufficient to specify only one of the two fields; the second one will be calculated automatically.

To use this field, your account needs to have the "Packages on Inventory Transfers" extra module enabled, otherwise API will return error code 1028. Please contact customer support to enable it.

Decimal
***** Additional attributes associated with this item.

Attributes must be supplied as a flat list, each attribute defined by the following set of three parameters. Replace # with set number (1, 2, 3, ...). When updating an existing entry, API will only update the attributes specified in input data and leave all other existing attributes unchanged. To delete an attribute, set its value to 'null' or 'undefined'.
attributeName# Attribute name. Name can only contain the following symbols: A-Z, a-z, 0-9, dash and underscore. string
attributeType# Attribute type, possible types are 'text', 'int' and 'double'. By default 'text'. string
attributeValue# Value of the attribute. Set value to 'null' or 'undefined' to delete an attribute.
'text' attribute can be any string, maximum 255 characters.
'int' must be a signed 32-bit integer.
'double' must be a decimal number.
string

Response

Field name Type Description
inventoryTransferID integer ID of the created or updated document.