Rate Inquiry
Rate inquiry actions are exposed via REST Web services for rate route and network rate and route calls. Rate and Route lists the best shipping option for each valid itinerary. Network rate and route returns results either "By Itinerary" or "By Schedule and Equipment".
You can POST a payload containing an order release as a sub-resource along with some data constraints to the provided REST endpoints and get a response for all valid itineraries.
- Rate and Route: This option considers the input provided and constructs an in-memory order release. The application uses this in memory order release to plan and optimize the different options based on the itineraries and the equipment that are applicable for the order and finds the best shipping option for these itineraries. You can constrain the order release with the various constraints like the Itinerary profile, source and destination geo hierarchy, equipment provided as part of input and equipment derived from the equipment configured on location and items.
- Network Rate and Route: This option is used for optimizing the routing of the order (constructed the same way as that for Rate and Route) using Network algorithms. It uses the network and network legs to route the order through different networks.
The following are the sample URLs for requesting the inquiries for both Rate and Route and Network Rate Route options.
Rate and Route
curl -u username:password
--location
'https://<server>:<port>/logisticsRestApi/resources-int/v2/custom-actions/riqRateAndRoute'
--header 'Content-Type: application/json' --data
'<inputJsonPayload>'
Network Rate and Route
curl -u username:password
--location 'https://
<server>:<port>/logisticsRestApi/resources-int/v2/custom-actions/riqNetworkRateAndRoute'
--header 'Content-Type: application/json' --data
'<inputJsonPayload>'
-
requestType: The requestType can be LowestCost, FastestTransit, or AllOptions.
-
perspective: Perspective is either Buy or Sell, or accept the default. Values are B, S or A. (Buy, Sell or All respectively.)
-
parameterSetGid: Planning parameter set ID.
-
isPrimaryOptionCentric: This is used only in for the Network Rate Route scenario. The accepted value is true or false, with a default of false. If the Primary Option Centric value is true, OTM evaluates primary leg options first then evaluates supporting options for each primary leg option. If it's false, all options in a route are evaluated in a single step and OTM will compare locations instead of itinerary or leg IDs when evaluating routing options. For example, two routing options are considered equal if their locations and other attributes are the same, even though they've different itinerary or leg IDs. Only one routing option is returned and displayed.
-
primaryOptionDefinition: This is used only in the Network Rate Route scenario. Use the values "By Itinerary" or "By Schedule and Equipment Group" to specify how to group primary options to get the top set of options. This is only available if the Primary Centric check box is selected.
-
maxPrimaryOptions: This is used only in the Network Rate Route scenario. Lets you configure the number of best options to be retrieved per itinerary instead of having only the best option.
-
maxSupportingOptions: This is used only in the Network Rate Route scenario. The maxSupportingOptions value is the maximum number of supporting (non-primary) leg options to retrieve that are compatible with each respective primary leg option. Set this to a number greater than 1 if the non-primary leg option can identify what the best cost solution is.
-
estimateTieredRateNum: This field specifies the tier number of the costs in the rate. The number you enter in this field is substituted for the actual tier number when inquiring on a rate.
-
forceTieredRating: The accepted value is true or false, with a default of false.
-
sourceLocationProfileGid: The SourceLocationProfileGid lets you check multiple sourcing locations at once. This eliminates the need to perform multiple rate inquiry requests. There's a Rate Inquiry property, glog.riq.maxNumberofSourceLocationsAllowed, to limit how many locations are in a profile so the rate inquiry runtime doesn't get too long.
-
orderRelease: The orderRelease resource.
Some of the input constraints that can be specified are as follows:
Input Constraint | JSON Property |
---|---|
Equipment Group Profile |
orderReleases.equipmentGroupProfileGid |
Equipment Groups |
orderReleases.equipments |
Rate Service ID |
orderReleases.rateServiceGid |
Rate Offering ID |
orderReleases.rateOfferingGid |
Rate Record ID |
orderReleases.rateGeoGid |
INCO Term ID |
orderReleases.incoTermGid |
INCO Term Location |
orderReleases.termLocationText |
Voyage ID |
orderReleases.voyageGid |
Accessorial Codes |
orderReleases.accessorials |
Originating Carrier |
orderReleases.pickupRailCarrier |
Delivery Carrier |
orderReleases.deliveryRailCarrier |
Route Code |
orderReleases.railRouteCodeGid |
Additional Stops Location ID Leg Position |
orderReleases.stops orderReleases.stops.locationGid orderReleases.stops.legPosition |
Service Providers |
orderReleases.legConstraints.servprovGid |
Transport Modes |
orderReleases.legConstraints.transportModeGid |
Special Services Special Service ID Duration |
orderReleases.specialServices orderReleases.specialServices.specialServiceCodeGid orderReleases.specialServices.time |
Order Release Reference Reference Number Qualifier ID Reference Number |
orderReleases.refnums orderReleases.refnums.orderReleaseRefnumQualGid orderReleases.refnums.referenceNumber |
Flex Commodity Qualifier |
orderReleases.shipUnits.flexCommodityQualGid |
Commodity Code |
orderReleases.shipUnits.flexCommodityCode |
Transport Handling Unit |
orderReleases.shipUnits.transportHandlingUnitGid |
Ship Unit Count |
orderReleases.shipUnits.shipUnitCount |
Hazardous |
orderReleases.lines.isHazardous |
Packaged Item ID |
orderReleases.lines.packagedItemGid |
Hazmat Item ID |
orderReleases.lines.hazHazmatItemGid |
Weight |
orderReleases.lines.weight |
Volume |
orderReleases.lines.volume |
Splittable |
orderReleases.shipUnits.isSplitable |
Length |
orderReleases.shipUnits.unitLength |
Width |
orderReleases.shipUnits.unitWidth |
Height |
orderReleases.shipUnits.unitHeight |
Value |
orderReleases.lines.declaredValue |
Properties
- glog.fusion.cil.restapi.structuredAction.checkMaxAllowedConcurrentRequests: Default value is true. This property works as an ON/OFF flag that controls total number of maximum allowed concurrent requests for RIQ calls.
- glog.fusion.cil.restapi.structuredAction.riqRateAndRoute.defaultReleaseMethodGid: Probable values for releaseMethodGid are ONE_TO_ONE, PREPACK, INSTRUCTED PREPACK, AGGREGATE LINE PREPACK, AUTO_CALC, AUTO_CALC_UNIQUE, SIMPLE, SHIP_UNITS, SHIP_UNIT_LINES, S_SHIP_UNIT_DEFAULT, ONE_TO_ONE_PACK. Default value is ONE_TO_ONE. This property is used to set order release method which is used to identify how ship units are built when only order release lines are provided.
The following is an example of when at least one line item with default values inside orderReleases are provided. A payload with source location and destination location.
{
"requestType": "AllOptions",
"perspective": "B",
"orderReleases": {
"sourceLocationGid": "SAMPLE.DENVER",
"destLocationGid": "SAMPLE.NEW YORK",
"lines": {
"items": [
{
"packagedItemGid": "DEFAULT",
"weight": {
"value": 0,
"unit": "LB"
},
"volume": {
"value": 0,
"unit": "CUFT"
},
"declaredValue": {
"value": 0,
"currency": "USD"
},
"itemPackageCount": 1
}
]
}
}
}
If shipUnits are provided, each shipUnit should have at least one ship unit line item. Each ship unit line item should be mapped with an order release line item. A payload with a rate geo ID, ship units, and order release lines. For example:
{
"requestType": "AllOptions",
"perspective": "B",
"orderReleases": {
"sourceLocationGid": "SAMPLE.BALTIMORE",
"destLocationGid": "SAMPLE.DALLAS",
"rateGeoGid": "SAMPLE.SELECTED_DV_RR",
"earlyPickupDate": {
"value": "2022-12-06T03:20:00-05:00"
},
"releaseMethodGid" : "ONE_TO_ONE",
"lines": {
"items": [
{
"orderReleaseLineGid": "orlGid101",
"packagedItemGid": "DEFAULT",
"weight": {
"value": 2400.0,
"unit": "LB"
},
"volume": {
"value": 2200.0,
"unit": "CUFT"
},
"declaredValue": {
"value": 100,
"currency": "USD"
},
"itemPackageCount": 1
},
{
"orderReleaseLineGid": "orlGid201",
"packagedItemGid": "DEFAULT",
"weight": {
"value": 600.0,
"unit": "LB"
},
"volume": {
"value": 550.0,
"unit": "CUFT"
},
"declaredValue": {
"value": 2,
"currency": "USD"
},
"itemPackageCount": 1
}
]
},
"shipUnits": {
"items": [
{
"isSplitable": false,
"shipUnitCount": 2,
"unitLength": {
"value": 4.0,
"unit": "FT"
},
"unitWidth": {
"value": 4.0,
"unit": "FT"
},
"unitHeight": {
"value": 4.0,
"unit": "FT"
},
"unitWeight": {
"value": 1200.0,
"unit": "LB"
},
"unitVolume": {
"value": 1100.0,
"unit": "CUFT"
},
"lines": {
"items": [
{
"orderReleaseLineGid": "orlGid101",
"itemPackageCount": 1
}
]
}
},
{
"isSplitable": false,
"shipUnitCount": 1,
"unitLength": {
"value": 2.0,
"unit": "FT"
},
"unitWidth": {
"value": 2.0,
"unit": "FT"
},
"unitHeight": {
"value": 0.0,
"unit": "FT"
},
"unitWeight": {
"value": 600.0,
"unit": "LB"
},
"unitVolume": {
"value": 550.0,
"unit": "CUFT"
},
"lines": {
"items": [
{
"orderReleaseLineGid": "orlGid201",
"itemPackageCount": 1
}
]
}
}
]
}
}
}
A sample response:
{
"rateAndRouteResponse": [
{
"totalActualCost": {
"value": "81.6",
"currency": "USD"
},
"costPerUnit": {
"value": "0.06",
"currency": "USD"
},
"totalWeightedCost": {
"value": "81.6",
"currency": "USD"
},
"weightedCostPerUnit": {
"value": "0.06",
"currency": "USD"
},
"shipFrom": {
"locationGid": "SAMPLE.BALTIMORE",
"links": [
{
"rel": "canonical",
"href": "v2/locations/SAMPLE.BALTIMORE"
}
]
},
"shipTo": {
"locationGid": "SAMPLE.DALLAS",
"links": [
{
"rel": "canonical",
"href": "v2/locations/SAMPLE.DALLAS"
}
]
},
"transportMode": {
"transportModeGid": "TL",
"links": [
{
"rel": "canonical",
"href": "v2/transportModes/TL"
}
]
},
"serviceProvider": {
"servprovGid": "SAMPLE.YELLOW",
"links": [
{
"rel": "canonical",
"href": "v2/serviceProviders/SAMPLE.YELLOW"
}
]
},
"transitTime": {
"amount": "26.4",
"type": "H"
},
"startTime": {
"value": "2022-12-06T03:20:00-05:00"
},
"endTime": {
"value": "2022-12-07T04:43:59-06:00"
},
"totalLeadTime": {},
"equipmentGroup": {
"equipmentGroupGid": "SAMPLE.48K DRY",
"links": [
{
"rel": "canonical",
"href": "v2/equipmentGroups/SAMPLE.48K%20DRY"
}
]
},
"itinerary": {
"itineraryGid": "SAMPLE.USA TO USA",
"links": [
{
"rel": "canonical",
"href": "v2/itineraries/SAMPLE.USA%20TO%20USA"
}
]
},
"primaryShipmentSource": {
"locationGid": "SAMPLE.BALTIMORE",
"links": [
{
"rel": "canonical",
"href": "v2/locations/SAMPLE.BALTIMORE"
}
]
},
"primaryShipmentDestination": {
"locationGid": "SAMPLE.DALLAS",
"links": [
{
"rel": "canonical",
"href": "v2/locations/SAMPLE.DALLAS"
}
]
},
"primaryTotalCost": {
"value": "81.6",
"currency": "USD"
},
"primaryTransitTime": {
"amount": "26.4",
"type": "H"
},
"estimatedArrivalTimeAtSource": {
"value": "2022-12-06T03:20:00-05:00"
},
"estimatedDeparturelTimeAtSource": {
"value": "2022-12-06T03:20:00-05:00"
},
"estimatedArrivalTimeAtDestination": {
"value": "2022-12-06T03:20:00-05:00"
},
"estimatedDepartureTimeAtDestination": {
"value": "2022-12-06T03:20:00-05:00"
},
"primaryRateOffering": {
"rateOfferingGid": "SAMPLE.SELECTED_DV_COUNT_RO",
"links": [
{
"rel": "canonical",
"href": "v2/rateOfferings/SAMPLE.SELECTED_DV_COUNT_RO"
}
]
},
"primaryRateRecord": {
"rateRecordGid": "SAMPLE.SELECTED_DV_RR",
"links": [
{
"rel": "canonical",
"href": "v2/rateRecords/SAMPLE.SELECTED_DV_RR"
}
]
},
"toShipments": [
{
"cost": {
"value": "81.6",
"currency": "USD"
},
"weightedCost": {
"value": "81.6",
"currency": "USD"
},
"origin": {
"locationGid": "SAMPLE.BALTIMORE",
"links": [
{
"rel": "canonical",
"href": "v2/locations/SAMPLE.BALTIMORE"
}
]
},
"destination": {
"locationGid": "SAMPLE.DALLAS",
"links": [
{
"rel": "canonical",
"href": "v2/locations/SAMPLE.DALLAS"
}
]
},
"transportMode": {
},
"serviceProvider": {
},
"transitTime": {
"amount": "26.4",
"type": "H"
},
"startTime": {
"value": "2022-12-06T03:20:00-05:00"
},
"endTime": {
"value": "2022-12-07T04:43:59-06:00"
},
"distance": {
"amount": 1451.99,
"type": "MI"
},
"weight": {
"amount": 3000.0,
"type": "LB"
},
"volume": {
"amount": 2750.0,
"type": "CUFT"
},
"rateOffering": {
},
"rateRecord": {
},
"equipmentGroup": {
},
"itineraryLeg": {
}
}
]
}
]
}
{
"requestType": "AllOptions",
"perspective": "B",
"isPrimaryOptionCentric": "true",
"primaryOptionDefinition": "BY_ITINERARY",
"orderReleases": {
"orderReleaseGid" : "SAMPLE.NEW20121000719088-001"
}
}