GET orders/{ordernumber}/shipping-rules
The same evaluation for an order that already exists, with the attributes taken from that order.
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| ordernumber | The Order Number to evaluate. | integer | Required |
Body Parameters
None.
Response Information
Resource Description
The same evaluation for an order that already exists, with the attributes taken from that 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
}
]
}