WMS (Warehouse Management Software) is a system to support warehouse management and optimize its functionality. This document is focused on the API side of WMS.
As a user, you might rather be interested in the apps and the workflow we offer — instead of the raw API. The processes are documented here: https://wiki.erply.com/article/351-warehouse-management-system-wms
Authentication
For authentication, the following parameters are required:
- clientCode
- sessionKey
Batch
Batch is a way of grouping multiple units of the same product, that is produced at the same time and having the same expiry date. It can be specified with a special batch code to track this group of products.
Creating a batch
The call POST /batch creates a new batch. The required fields for creating a batch as a JSON array are:
batchCode - list of strings. One or multiple codes can be added
expiryDate - date as a string in a format “YYYY-MM-DD”
productId - existing product id as an integer
Updating a batch
The call PUT /batch/{id} updates a batch. The following fields can be updated:
changing expiryDate - date as a string in a format “YYYY-MM-DD”
deleting batchCode - removing “id”; “batchId” and “code” from batchCodes list
adding batchCode - adding “batchId” and “code” to batchCodes list
editing batchCode code - changing “code” parameter from batchCodes list
The following fields cannot be edited:
batchId
batchCode id
productId
added; addedById; changed; changedById
Retrieving a batch
The call GET /batch returns a list of created batches. The call GET /batch/{id} returns a specific batch.
It supports filtering by:
productId - getting all batches linked to the product
batchCode - getting all batches with the batch code
Deleting a batch
The call DELETE /batch/{id} deletes a batch and batch codes linked to the batch.
Bin
Bin is the smallest available unit of space in a warehouse. The location of the bin in a warehouse can be addressed by bin code, where the code indicates the exact location.
Creating a bin
The call POST /bin creates a new bin. The optional fields for creating a bin as a JSON array are:
warehouseId - warehouse id as an integer, where the bin is located. By default - 0.
code - code of the bin as a string - By default - empty.
active - whether the bin is active (true) or archived (false). By default - false.
preferred - whether the bin is preferred (true) or not (false). By default - false.
binOrder - order of the bin as an integer. By default - 0.
allowedProduct - product name as a string, if only specific product or products are meant for storing. By default - empty string.
replenishmentMinimum - quantity as an integer. If product’s quantity is smaller than the minimum quantity, it will be reordered. By default - 0.
maximumAmount - quantity as an integer of what is the maximum capacity in this bin. By default - 0.
Updating a bin
The call PUT /bin/{id} updates a bin. The same fields as for creating a bin, can be updated as well (read “Creating a bin” section). Last edited person name (“changedBy”) and timestamp (“changed”) are updated after each edit.
Retrieving a bin
The call GET /bin returns a list of created bins. It supports filtering by:
warehouseId
Preferred
active
code
id - one or multiple ids (separated by commas)
The call GET /bin/{id} returns a specific bin.
Paging supported by choosing which page is shown (“page”) and how many records are shown per page (“pageSize”). By default, the first page is shown with 25 records.
Bin records can be ordered (“order”) in ascending order (ASC) or descending order (DESC).
Deleting a bin
The call DELETE /bin/{id} deletes a bin.
Bin inventory
Bin inventory shows added products to the bins and each product’s quantity in that bin. Product can be added to multiple bins.
Retrieving a bin inventory
The call GET /bin-inventory lists all the created records for the products in bins. The quantity of products in a bin can be updated by creating a new inventory record.
Bin inventory record
Bin inventory record is usually created from some sale or inventory documents. Therefore the product is either added to the bin (Purchase Invoice / Inventory Registration) or taken from the bin (Sales Invoice / Inventory Write-Off / Assignment). It shows, which bin is related to the product’s movement and what is the quantity of the moved product.
Creating a bin inventory record
The call POST /bin-inventory-record creates a new bin inventory record. One or multiple records can be added to one call. The required fields for creating a bin inventory record as a JSON list are:
binId - existing bin id must be added as an integer
batchId - existing batch id must be added as an integer
productId - existing product id must be added as an integer. Product must also be linked to the added batch id.
amount - amount as an integer. Can be both positive and negative, but cannot be 0.
Other optional fields can be added to the call:
referenceType - type as a string. Possible values can be: “SALES_DOCUMENT”; “PURCHASE_DOCUMENT”; “INVENTORY_REGISTRATION”; “INVENTORY_WRITE_OFF”; “INVENTORY_TRANSFER” and “ASSIGNMENT”.
referenceId - reference id as an integer. If “referenceType” field is added, then “referenceId” field is mandatory as well. And vice versa.
prodAmortTypeId
documentRowId
orgperIdDat
recordType
When new bin inventory record is created, and there already exists a record with the same bin and product, then the amount changes in GET /bin-inventory record
Updating a bin inventory record
The call PUT /bin-inventory-record/{id} updates a bin inventory record. The following fields cannot be edited:
binId
productId
amount
batchId
All other fields can be edited.
Last edited person name (“changedBy”) and timestamp (“changed”) are updated after each edit.
Retrieving a bin inventory record
The call GET /bin-inventory-record returns a list of bin inventory records. It supports filtering by:
referenceType
referenceId
id - one or multiple ids (separated by commas)
The call GET /bin-inventory-record/{id} returns a specific bin inventory record.
Paging supported by choosing which page is shown (“page”) and how many records are shown per page (“pageSize”). By default, the first page is shown with 25 records.
Bin inventory records can be ordered (“order”) in ascending order (ASC) or descending order (DESC).
Deleting a bin inventory record
The call DELETE /bin-inventory-record/{id} deletes a bin inventory record.
Stocktaking
Stocktaking is counting products in a specified bin.
Creating a stocktaking
The call POST /stocktaking creates a new stocktaking. The only field, that has to be added as a JSON array, is:
binId - existing bin id has to be added as an integer
Updating a stocktaking
The call PUT /stocktaking updates a stocktaking. The only field, that can be updated, is:
finished - whether it’s “true” or “false”. By default, the value is “false”.
Retrieving a stocktaking
The call GET /stocktaking returns a list of bin inventory records. It supports filtering by:
referenceType
warehouseId
binid
userId
finished - whether “true” or “false”
The call GET /stocktaking/{id} returns a specific stocktaking.
Deleting a stocktaking
The call DELETE /stocktaking/{id} deletes a stocktaking.
Stocktaking record
Stocktaking record is counting products in a specified bin.
Updating a stocktaking
The call PUT /stocktaking/{id}/stocktaking-record updates a stocktaking record.The quantity of a product in a batch can be updated. The following fields have to be added as a JSON array:
batchId - existing batch id as an integer
productId - existing product id as an integer linked to the added batch id
countedQuantity - quantity of the product as an integer
Retrieving a stocktaking
The call GET /stocktaking/{id}/stocktaking-record returns all stocktaking records linked to the stocktaking. The stocktaking records can be filtered by:
productId
batchId