Entity Update API

URL: "xxx.wms.ocs.oraclecloud.com/env_name/wms/api/entity/entity_name/key/sequence_number/"

Method:PATCH

Initial WMS Version: 8.0.2

Overview

API is used for updating certain attributes of an entity. Sometimes the clients would want to update certain fields of an entity like stop ship flag on the order. Entity Update API provides for an ability to modify certain fields on the requested entity.

  • Entity name should be provided as part of the URL. URL should also contain the key against which the specific attributes needs to be updated.
  • Sequence number key will be required if the updates are being done for supported detail tables.
  • API will respond with a success or error message.
  • Not all entities are supported, supported entities are mentioned below.
  • If facility code and company code is provided search for the entity key is done for the specific facility code and company code. If facility code and company code is not provided then entity key is searched across for the default facility and company for the API invoked users and also the user's eligible facility and company combination.
Assumptions:
  • If the fields provided for update in xml_data is not supported API will respond with an error.

Supported Entities for Entity Update

Entity Usage
order_hdr Refer to the following section for additional details and columns exposed. For example, to update order related fields:

https:////<xxx.wms.ocs.oraclecloud.com>//<env_name>/wms/api/entity>/order/order001/

xml_data needs to be specified which encapsulates the attributes to be updated. . Below mentioned are the arguments that needs to be passed for updating order when the entity passed is Order.
Parameter Name Required Default Value Data Type Comments
company_code Optional string WMS Company Code, if not specified, API invoked users eligible companies will be evaluated
facility_code Optional string User eligible facility code, if not specified, API invoked users eligible companies will be evaluated.
xml_data X Fields to be updated with specific values for the corresponding entity.

Refer the below section for additional details and columns exposed.Example to update purchase order dtl related fields

purchase_order_dtl

https:////<xxx.wms.ocs.oraclecloud.com>//<env_name>/wms/api/entity>/purchase_order_dtl/POTST001/1 (will update columns for particular sequence number passed).

https:////<xxx.wms.ocs.oraclecloud.com>//<env_name>/wms/api/entity>/purchase_order_dtl/POTST001/0 (will update all columns on the purchase order detail).

https:////<xxx.wms.ocs.oraclecloud.com>//<env_name>/wms/api/entity>/purchase_order_dtl/POTST001/ (will update all columns on the purchase order detail).

xml_data needs to be specified which encapsulates the attributes to be updated. Below mentioned section provides details about the arguments.
Parameter Name Required Default Value Data Type Comments
company_code Optional string WMS Company Code, if not specified, API invoked users eligible companies will be evaluated
facility_code Optional string User eligible facility code, if not specified, API invoked users eligible companies will be evaluated.
xml_data X Fields to be updated with specific values for the corresponding entity.
active_inventory

Refer the below section for additional details and columns exposed.

  • Example to update active_inventory with item not tracking batch numbers, expiry date or any of the attributes(a-g) and quantity down adjusted by 2.
    • PATCH wms/api/entity/active_inventory/<location_barcode>/?reason_code=value&item_code=value&adjustment_qty= -2
  • Example to update active_inventory with item is tracking batch number only and not tracking expiry date or any of the attributes (a-g) and quantity increased by 2.
    • PATCH wms/api/entity/active_inventory/<location_barcode>/?reason_code=value&item_code=value&adjustment_qty= 2&batch_number=value
    • PATCH wms/api/entity/active_inventory/<location_barcode>/?reason_code=value&item_alternate_code=value&adjustment_qty= 2&invn_attr_a=value (This will try to search for inventory in specified location for item passed in item_alternate_code argument with attribute_a value passed in the API and rest of the other fields with blank.
Below mentioned section provides details about the arguments to be passed when Entity is active_inventory.
Parameter Required Data Type Default Comments
location X string Location barcode - Passed in URL
reason_code X string Reason Code provided will be updated on the corresponding inventory history record generated
facility_code string User's default facility User eligible facility code
company_code string User's default company User eligible company code
item_code C string Only one of item_code or item alternate code or item barcode is required
item_alternate_code C string Only one of item_code or item alternate code or item barcode is required
item_barcode C string Only one of item_code or item alternate code or item barcode is required
adjustment_qty C numeric Non-zero value. Only one of adjustment qty or actual_qty needs to be provided.
actual_qty C numeric Non-zero value. Only one of adjustment qty or actual_qty needs to be provided.
batch_number string New or existing batch tied to the inventory. If item is tracking batch number, batch_number argument needs to be passed.
expiry_date C date Required if a new batch is being created and item is tracking expiration date
invn_attr_a string Used to filter target inventory for update.
invn_attr_b string Used to filter target inventory for update.
invn_attr_c string Used to filter target inventory for update.
invn_attr_d string Used to filter target inventory for update.
invn_attr_e string Used to filter target inventory for update.
invn_attr_f string Used to filter target inventory for update.
invn_attr_g string Used to filter target inventory for update.

If the corresponding item/batch/expiry/inventory attributes do not exist in the specified location system does create a new inventory record for the location, If record found then current quantity can be passed.

Order

The following table describes the fields to be passed in xml_data argument:

Order

Field Supported Version
stop_ship_flg
8.0.2 (can pass value of true or false)
cust_field_1
8.0.2
cust_field_2
8.0.2
cust_field_3
8.0.2
cust_field_4
8.0.2
cust_field_5
8.0.2
cust_long_text_1
8.0.2
cust_long_text_2
8.0.2
cust_long_text_3
8.0.2
cust_short_text_1
8.0.2
cust_short_text_2
8.0.2
cust_short_text_3
8.0.2
cust_short_text_4
8.0.2
cust_short_text_5
8.0.2
cust_short_text_6
8.0.2
cust_short_text_7
8.0.2
cust_short_text_8
8.0.2
cust_short_text_9
8.0.2
cust_short_text_10
8.0.2
cust_short_text_11
8.0.2
cust_short_text_12
8.0.2

purchase_order_dtl

Below mentioned describes the fields to be passed in xml_data argument:

Purchase Order Detail

Field Supported Version
cust_field_1
8.0.2
cust_field_2
8.0.2
cust_field_3
8.0.2
cust_field_4
8.0.2
cust_field_5
8.0.2
stop_recv_flg
8.0.2 (can pass value of true or false)