There is a full API collection that allows creating, deleting and submitting count events to overwrite the quantities of stock items in stock at a given outlet.
These endpoints are intuitive to use and predictable, but there is one aspect which is not immediately clear from the user interface that API users need to pay attention to.
Apicbase allows multiple users to count their inventory in the same outlet in parallel. To achieve this, count events are a two-tiered structured with top counts and sub-counts.
A top count is a composition of its sub-counts. Starting a count event starts both a top count and a sub-count, and subsequent sub-counts can be started while the top count is open. The top count cannot be manipulated, its quantities are simply the sum of the quantities of its sub-counts.
Changes to inventory are only applied when the top count is closed. Closing a top count also closes all of its sub-counts, and you can only work on sub-counts whose top count has not been closed. Only one top count can be open at an outlet at the same time. Different endpoints are provided to work with top counts and sub-counts!
These steps should be followed in this order to submit a count event via the Apicbase API:
- Create a top count.
- Create a sub-count inside the top count that was created.
- Add a stock item counted quantity to the sub count.
- Or, alternatively, upload all counted stock item quantities to a sub count in bulk.
- Submit the sub-count.
- Repeat steps 2 through 4 to add other sub-counts to the same top count.
- Submit the top count.
Inventory updates are only final after the last step, when the top-level count has been submitted. Submitting the sub-count is optional and if it stays unclosed, it will be closed automatically when the top count is submitted.
Updated about 2 months ago