POST shipping-rules/evaluate
Work out which shipping rules apply to a set of order attributes, and which one would win, without creating an order.
Request Information
URI Parameters
None.
Body Parameters
EvaluateShippingRulesCommand
| Name | Description | Type | Additional information |
|---|---|---|---|
| ChannelID | The Channel the order would arrive on. Rules can be pinned to a channel, and a rule pinned to one scores higher than a rule that applies to all channels. | integer | None. |
| ChannelShippingMethod | The shipping method text supplied by the Channel, matched against a rule's channel shipping method. | string | None. |
| OrderTotal | decimal number | None. | |
| OrderSubtotal | decimal number | None. | |
| OrderWeight | decimal number | None. | |
| OrderShippingCost | What the customer paid for shipping. | decimal number | None. |
| PackagingID | integer | None. | |
| HazardousMaterials | True if any line is a hazardous product. | boolean | None. |
| IsFragile | True if any line is a fragile product. | boolean | None. |
| ContainsBladedItems | True if any line is a bladed product. | boolean | None. |
| ShippingCountryID | integer | None. | |
| ShippingState | The destination state and postcode as text. Both are resolved to their internal IDs the same way the import does, so a caller does not have to know those IDs. | string | None. |
| ShippingZip | string | None. | |
| CurrencyID | integer | None. | |
| IsPriority | boolean | None. | |
| IsPrime | boolean | None. | |
| IsAmazonBusiness | boolean | None. | |
| OrderLineCount | Lines excluding kit components, matching what the import counts. | integer | None. |
| WarehouseID | integer | None. | |
| IossNumber | string | None. | |
| EvaluateAt | The moment to evaluate at, in the account's time zone. Rules can be pinned to a day of the week and a courier cut-off time, so an evaluation is only reproducible if the caller can pin this. Defaults to now in the account's time zone. | date | None. |
Request Formats
application/json, text/json
Sample:
{
"ChannelID": 1,
"ChannelShippingMethod": "sample string 2",
"OrderTotal": 3.0,
"OrderSubtotal": 4.0,
"OrderWeight": 5.0,
"OrderShippingCost": 6.0,
"PackagingID": 1,
"HazardousMaterials": true,
"IsFragile": true,
"ContainsBladedItems": true,
"ShippingCountryID": 10,
"ShippingState": "sample string 11",
"ShippingZip": "sample string 12",
"CurrencyID": 13,
"IsPriority": true,
"IsPrime": true,
"IsAmazonBusiness": true,
"OrderLineCount": 17,
"WarehouseID": 1,
"IossNumber": "sample string 18",
"EvaluateAt": "2026-10-05T16:55:44.1931435+00:00"
}
application/xml, text/xml
Sample:
<EvaluateShippingRulesCommand xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ChannelID>1</ChannelID> <ChannelShippingMethod>sample string 2</ChannelShippingMethod> <OrderTotal>3</OrderTotal> <OrderSubtotal>4</OrderSubtotal> <OrderWeight>5</OrderWeight> <OrderShippingCost>6</OrderShippingCost> <PackagingID>1</PackagingID> <HazardousMaterials>true</HazardousMaterials> <IsFragile>true</IsFragile> <ContainsBladedItems>true</ContainsBladedItems> <ShippingCountryID>10</ShippingCountryID> <ShippingState>sample string 11</ShippingState> <ShippingZip>sample string 12</ShippingZip> <CurrencyID>13</CurrencyID> <IsPriority>true</IsPriority> <IsPrime>true</IsPrime> <IsAmazonBusiness>true</IsAmazonBusiness> <OrderLineCount>17</OrderLineCount> <WarehouseID>1</WarehouseID> <IossNumber>sample string 18</IossNumber> <EvaluateAt>2026-10-05T16:55:44.1931435+00:00</EvaluateAt> </EvaluateShippingRulesCommand>
Response Information
Resource Description
Work out which shipping rules apply to a set of order attributes, and which one would win, without creating an order.
ShippingRuleEvaluationModel| Name | Description | Type | Additional information |
|---|---|---|---|
| MatchedARule | False when no rule applied. The order would then take the account's default shipping method, reported in DefaultShippingMethodID. | boolean | None. |
| WinningRule | The rule that would be applied: the highest ranked one that is enabled. Null when none applied. | ApplicableShippingRuleModel | None. |
| DefaultShippingMethodID | The account default, which is what the order gets when no rule applies. | integer | None. |
| WinnerIsAmbiguous | True when the winning rule ties with the next enabled rule on both specificity and priority. Nothing then decides between them: the procedure that assigns a method in production takes the first row of an unordered result, so a tie can be resolved differently from one run to the next. A rule configuration that produces this needs a priority set, whatever this evaluation reports. | boolean | None. |
| ApplicableRules | Every applicable rule, most specific first, including disabled ones. Rules below the winner are what it beat, which is what makes a routing decision explainable rather than merely reported. | Collection of ApplicableShippingRuleModel | None. |
Response Formats
application/json, text/json
Sample:
{
"MatchedARule": true,
"WinningRule": {
"ShippingRuleID": 1,
"ShippingRuleName": "sample string 2",
"Specificity": 1.0,
"Priority": 1,
"Enabled": true,
"ShippingMethodID": 4,
"ShippingTax": 1.0,
"AddPriorityFlag": true
},
"DefaultShippingMethodID": 2,
"WinnerIsAmbiguous": true,
"ApplicableRules": [
{
"ShippingRuleID": 1,
"ShippingRuleName": "sample string 2",
"Specificity": 1.0,
"Priority": 1,
"Enabled": true,
"ShippingMethodID": 4,
"ShippingTax": 1.0,
"AddPriorityFlag": true
},
{
"ShippingRuleID": 1,
"ShippingRuleName": "sample string 2",
"Specificity": 1.0,
"Priority": 1,
"Enabled": true,
"ShippingMethodID": 4,
"ShippingTax": 1.0,
"AddPriorityFlag": true
}
]
}