itemAvailability resource type
Represents an item availability in Business Central.
Note
For information about enabling APIs for Business Central see Enabling the APIs for Dynamics 365 Business Central.
Methods
| Method | Return Type | Description |
|---|---|---|
| GET itemAvailability | ItemAvailability | Gets an Item Availability object. |
Navigation
| Navigation | Return Type | Description |
|---|---|---|
| itemVariantAvailabilitiesWebCon | itemVariantAvailabilitiesWebCon | Gets the itemVariantAvailabilitiesWebCon of the item |
Properties
| Property | Type | Description |
|---|---|---|
| 🔑 id | GUID | The unique ID of the item. |
| no | string | Specifies the item no. |
| description | string | Specifies the item description. |
| locationFilter | string | Specifies the location code flow filter. |
| variantFilter | string | Specifies the variant code flow filter. |
| inventoriable | boolean | Specifies whether the item is inventoriable. |
| inventory | decimal | Specifies the inventory quantity for the item |
| availability | decimal | Specifies the quantity available for the item |
General information
The inventory and availability are recalculated with each call. Whilst the inventory is the quantity that is actually in the warehouse at that time, further parameters are taken into account for availability. In the standard implementation, the planned outgoing requirements are deducted from the availability.
If no filters are set, the inventory and the availability is calculated across all locations and all variants.
Tip
In Business Central, the inventory is already reduced when the item has left the warehouse and is on its way to the customer. This may need to be taken into account if the delivery note and invoice are created at different times, or if only a part of the order is shipped.
Working with Variants
Using "$expand=itemVariantAvailabilitiesWebCon", the inventory and availability calculation can be extended to the variants. The variant filter field can be used to restrict the calculation to specific variants.
Tip
In Business Central, variants are by default optional. It is not unthinkable that the base item has inventory and that there are other variants of this base item that also have inventory. The inventory of the base item can then only be determined by subtracting the inventory of the individual variants from the aggregated inventory of the base item. Alternatively, you can also get the inventory of the base item by filtering on the empty variant. e.g. $filter=variantFilter eq ''.
Working with Locations
The location filter field can be used to query the inventory for a specific location. It is also possible to filter multiple locations, in which case the inventory for these locations is returned cumulatively. If you want to have separate inventory for each location, you have to send a separate request for each location.
Tip
In Business Central, locations are also by default optional. Although rare, it is possible that there is inventory in the empty location. This empty location can be queried with $filter=locationFilter eq ''.