Category Archives: Shipping API’s

List of API/Interfaces in Shipping

Split Delivery Detail API

Standard API to Split the Delivery detail:



Auto create Delivery

Auto Create a delivery for a Delivery Detail.

Find the delivery detail id from the booked sales order line and pass as a parameter.

Sample script to Auto create deliveries:

Script to verify the script:


Debugging Shipping API’s

Debugging Shipping API’s:

Debugging Shipping API:

In some cases the API’s may not be successful might be because of setup issues or code issues.
In such cases calling the shipping debugger package(WHS_DEBUG_SV) in the wrapper file will result in the creation of a detailed debug log file based on the various debug profiles setup for shipping module  .
The steps given below will show the step by step approach to generate debug log file during the call to Shipping Public API’s.

Add the following lines into the Wrapper file  before making a call to the shipping:

 Sample API Code with Debug ON:


Set the Profiles
OM: Debug Level – set to 5
      INV: Debug Level – set to 10
      WSH: Debug Enabled – set to Yes
      WSH: Debug Level – set to Statement
      WSH: Debug Log Directory – set to a valid writeable directory path

Execute the shipping action via API

Navigate  to the respective directories specified using the profile
“WSH: Debug Log Directory”

Obtain the Debug

Referred from Oracle Metalink.


Ship Confirm using WSH_DELIVERIES_PUB.Delivery_Action

Ship Confirm Delivery using WSH_DELIVERIES_PUB.Delivery_Action

Specific Parameters:

p_action_code(Required) => action to be performed on Delivery

p_delivery_id (Required)  => delivery id on which the action is performed

p_trip_name    =>  Trip identifier for assignment of trip to delivery

p_asg_pickup_loc_code => Stop location code for pickup assignment

p_asg_pickup_dep_date => Stop location departure date for pickup assignment

p_asg_dropoff_loc_code=> Stop location code for dropoff assignment

p_asg_dropoff_dep_date=> Stop location departure date for dropoff assignment

p_sc_action_flag             => Ship Confirm option – S, B, T, A, C. Used p_sc_intransit_flag         => Ship Confirm set in-transit flag.

p_sc_close_trip_flag      => Ship Confirm close trip flag.

p_sc_create_bol_flag     => Ship Confirm create Bill of Lading flag

p_sc_stage_del_flag       => Ship Confirm create delivery for stage quantity flag

p_sc_trip_ship_method  => Ship Confirm trip ship method.

p_wv_override_flag       => Override flag for weight volume calculations.

x_trip_name                   => Name of autocreated trip.

Sample Code to Ship Confirm the Delivery:


UPDATE Delivery details

Update delivery details using WSH_DELIVERY_DETAILS_PUB.Update_Shipping_Attributes API

The “WSH_DELIVERY_DETAILS_PUB.Update_Shipping_Attributes” API enables to modify data in wsh_delivery_details. In this specific example we have used this API to update the shipped_quantity field in the wsh_delivery_details table to ship all quantities.

 Specific Parameters:

  • p_changed_attributes=>Attributes of ChangedAttributesTabType that are to be updated.
  • p_source_code => Code for source system which updates wsh_delivery_details table(always set to OE)

In order to specify in your logic about backorder or staged quantities you can use the following logic

Ship all quantities

changed_attributes(1).delivery_detail_id := <<Enter the detail id>>;

changed_attributes(1).shipped_quantity := <<Enter the full quantity to be shipped>>;

Back order all quantities

changed_attributes(2).delivery_detail_id := <<Enter the detail id>>;

changed_attributes(2).shipped_quantity := 0;

changed_attributes(2).cycle_count_quantity := <<Enter the full quantity to be shipped>>;

Stage all the quantities

changed_attributes(3).delivery_detail_id := <<Enter the full quantity to be shipped>>;

changed_attributes(3).shipped_quantity := 0;

changed_attributes(3).cycle_count_quantity := 0;

Sample code to Update the Delivery Details: