Update Active Inventory

URL: "xxx.wms.ocs.oraclecloud.com/env_name/wms/api/entity/active_inventory/location_barcode/"

Method: PATCH

Initial WMS Version: 8.0.2

Overview

API to update the inventory in an active location.

The API will attempt to first find any existing inventory to update for the location/item/batch/invn_attr combination provided. New inventory may be created for positive adjustments

Assumptions
  • Only one of item_code, item_alternate_code, or item_barcode should be provided
    • Item require batch number and invn_attr_X_tracking are considered
    • The item may NOT track serial numbers
    • If item has Require Expiry Date set then expiry_date is required
      • If the item requires an expiry date and batch_number is provided for an existing batch, and expiry_date is not provided, then the expiry date will be taken form the batch.
      • If the item requires an expiry date and batch_number is provided for an existing batch, and expiry_date is provided, the expiry date must match that of the batch.
  • Only one of adjustment_qty or actual_qty should be provided
    • actual_qty must be a positive number
    • adjustment_qty must be a non-zero number
  • Location must pass attribute checks
    • Item assignment type (Permanent/Dynamic)
    • Restrict batch number
    • Restrict inventory attribute
    • Allow multi-SKU
  • If locn_capacity_check_flg is set to true, location must pass capacity checks.
    • Min/Max units
      • In-transit inventory is considered
    • Min/Max volume
      • In-transit inventory is considered
  • If batch_nbr is passed for a positive adjustment and the batch does not exist, it will be created
  • If positive adjustment and no inventory exists for the combination, inventory will be created
    • If negative adjustment, the adjustment may be spread across multiple inventory records
    • Open allocations from the active location are considered in the calculations
      • Cannot down adjust the location’s quantity below was is already allocated
If the location has a lock code with ‘treat_as_attribute’ to one of the inventory attribute letters (a-g), and if the item updated has invn_attr_X_tracking_id=NOT_REQUIRED (where X is the same letter), then the value of lock_code will override the corresponding inventory attribute passed into the API.
Table 1. Request Arguments
Arguments Function Required Default Value Data Type
facility_code Corresponds to a valid facility code User default string
company_code Corresponds to a valid company code User default string
reason_code Reason for the adjustment X string
item_code Item whose inventory will be updated C string
item_alternate_code Item whose inventory will be updated C string
item_barcode Item whose inventory will be updated C string
adjustment_qty Positive or negative adjustment C decimal
actual_qty Positive actual quantity C decimal
batch_number Batch tied to inventory string
expiry_date

Expiry date of inventory/batch.

Format = YYYYMMDD

date
invn_attr_a Inventory attribute A string
invn_attr_b Inventory attribute B string
invn_attr_c Inventory attribute C string
invn_attr_d Inventory attribute D string
invn_attr_e Inventory attribute E string
invn_attr_f Inventory attribute F string
invn_attr_g Inventory attribute G string
locn_capacity_check_flg Location Capacity Check Flag True boolean
Note: Since version 9.0.0, new company parameter .max_allowed_qty_decimal_scale controls the decimal precision for the following fields: actual_qty and adjusted_qty