Create an Inventory Registration or update an existing one.
Inventory Registration is a document that takes products into inventory; it has a list of items and quantities. It is similar to a Purchase Invoice, but has fewer fields and is best suited for registering your initial stock quantities when you start using Erply — or for making inventory quantity adjustments.
Non-stock products and bundles cannot be on Inventory Registrations (these items do not have inventory).
Products can be removed from stock with Inventory Write-offs (see getInventoryWriteOffs and saveInventoryWriteOff) and moved between locations with Inventory Transfers (see getInventoryTransfers and saveInventoryTransfer).
To retrieve a list of Inventory Registrations, see getInventoryRegistrations.;
Parameter name | Description | Possible value | Required |
---|---|---|---|
inventoryRegistrationID | Inventory registration ID. Set this parameter to update an existing Inventory Registration. 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 Inventory Registration is already in confirmed status, it is no longer possible to change:
|
integer | |
creatorID | Company user unique ID | integer | |
warehouseID | ID of the warehouse | integer | yes |
stocktakingID | ID of the inventory stocktaking act, returns error 1186 if provided inventory stocktaking is already connected with inventory registration. | integer | |
supplierID | ID of the supplier | integer | |
reasonID | Reason Code ID. To use this field, your account needs to have the "Reason codes for Inventory registrations" module enabled, otherwise API will return error code 1006. Please contact customer support to enable it. | integer | |
currencyCode | Currency code: EUR, USD. Currency must be present in the system. If omitted, default currency will be used. |
string | |
date | eg. 2010-01-29 If omitted, current date will be used. Format: yyyy-mm-dd. |
string | |
cause | Source of received inventory | string | |
confirmed | By default 1 | 0 or 1 | |
***** | Document lines (rows). Send document lines as a flat list, each line defined by the following set of parameters. Replace # with set number (1, 2, 3, ...). For example: productID1, amount1, price1 for the first Inventory Registration row, productID2, amount2, price2 for the second one and so on. | ||
productID# | Product ID for this document line. | integer | yes |
amount# | Quantity to be taken into stock. This value can also be negative; in that case, the quantity will be subtracted from stock (written off). When doing inventory adjustments, it might be convenient to put both positive and negative changes on the same document. |
number | yes |
price# | Unit cost. The item will be added to inventory at this specified cost. | Decimal | |
packageID# | Set this field if you want to indicate that the product is taken into inventory 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 To use this field, your account needs to have the "Packages on Inventory Registrations" extra module enabled, otherwise API will return error code 1028. Please contact customer support to enable it. |
integer | |
amountOfPackages# | Amount of packages. If you specify both 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 Registrations" 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 |
Field name | Type | Description |
---|---|---|
inventoryRegistrationID | integer | ID of the newly-created item. Deprecated alternative name: inventoryReceiptID |