
Three main configurations affect the returned stockQty from the Posibolt API
1 - Role Configuration
To use the API calls, we need a set of credentials including a Posibolt user name.
The role to which this username belongs has warehouse access control, the API will only return Stock Quantity Values for the warehouses to which it has access.
2 - Client Configuration - Consider Order Taken As Sold
This front-end Posibolt configuration excludes the reserved quantity from the Posibolt StockQty return value
3 - excludeInTransit - API Parameter
The parameter is an option allowing API users to return quantity inclusive of that which is In Transit or to exclude it from the count.
How To Return Available Quantity
By setting the Consider Order Taken As Sold configuration and excluding inTransit in the API call, the logic will take the On Hand quantity, deduct what is reserved and will not add In Transit (As this is included in the On Hand count).
Bare in mind that this parameter works when the API user has access to all warehouse
We have enabled the " Consider order taken as sold" as well as included the "excludeInTransit" parameter in the productList API and set it to True.
The combination of the configurations now returns the AVAILABLE quantity through to the API which is the desired result from the client.
Bare in mind that the excludeInTransit set to true will only apply in the common event where the API user has access to ALL warehouses; In this case, the on-hand Quantity will include what is In transit and is the reason we have to exclude it from the API response.