Search

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 nameDescriptionPossible valueRequired
inventoryTransferIDInventory 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
creatorIDEmployee ID (see getEmployees) — the employee that prepared the Inventory Transfer.Integer
warehouseFromIDSource location (see getWarehouses).Integer yes
warehouseToIDDestination location.Integer yes
currencyCodeCurrency code: EUR, USD. Currency must be present in the system.
If omitted, default currency will be used.
String
typePossible 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
dateeg. 2010-01-29
If omitted, current date will be used.
Date
inventoryTransferOrderIDSource document ID.Integer
notesString
confirmedBy 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
*************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.
productID#Transfered product.Integer yes
amount#Transfered quantity.Decimal 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 nameTypeDescription
inventoryTransferIDIntegerID of the created or updated document.