[
  {
    "key": "evaluate-stacked",
    "method": "POST",
    "path": "/api/rating/evaluate",
    "request": {
      "meta": {
        "request_id": "req-pct-stacking-definition",
        "idempotency_key": "idem-pct-stacking-definition"
      },
      "data": {
        "type": "rating-evaluation",
        "attributes": {
          "division_id": "01m660wwjwz9zzjvs996j8bz2t",
          "contract_version": "pct-stacking-demo-definition-percentage-stacking-fixture",
          "operation_code": "rate_quote",
          "timezone": "Europe/Helsinki",
          "context": {
            "scope": {
              "division_id": "01m660wwjwz9zzjvs996j8bz2t"
            },
            "request": {
              "request_id": "scenario-pct-stacking-definition-percentage-stacking-fixture",
              "contract_version": "pct-stacking-demo-definition-percentage-stacking-fixture",
              "operation_code": "rate_quote",
              "timezone": "Europe/Helsinki",
              "execution_mode": "live"
            },
            "channel": {
              "channel_code": "api"
            },
            "customer": {
              "customer_group_codes": [
                "standard"
              ]
            }
          },
          "shipment": {
            "origin": {
              "country_code": "FI",
              "postal_code": "00100"
            },
            "destination": {
              "country_code": "FI",
              "postal_code": "70800"
            },
            "packages": [
              {
                "id": "pkg_1",
                "type": "parcel",
                "weight": {
                  "value": "1",
                  "unit": "kg"
                },
                "dimensions": {
                  "length": {
                    "value": "40",
                    "unit": "cm"
                  },
                  "width": {
                    "value": "30",
                    "unit": "cm"
                  },
                  "height": {
                    "value": "20",
                    "unit": "cm"
                  }
                }
              }
            ],
            "items": [
              {
                "id": "item-1",
                "description": "Parcel goods",
                "origin_country": "FI",
                "quantity": {
                  "value": 1,
                  "unit": "EACH"
                },
                "unit_value": {
                  "amount": "100.00",
                  "currency_code": "EUR"
                }
              }
            ],
            "legs": [
              {
                "id": "leg_1",
                "sequence": 1,
                "transport_mode": "road",
                "carrier_id": "carrier-pct-stacking-definition-percentage-stacking-fixture",
                "service_id": "svc-pct-stacking-definition-percentage-stacking-fixture",
                "origin": {
                  "country_code": "FI",
                  "postal_code": "00100"
                },
                "destination": {
                  "country_code": "FI",
                  "postal_code": "70800"
                },
                "package_ids": [
                  "pkg_1"
                ],
                "parties": {
                  "payor": {
                    "type": "organization"
                  },
                  "delivery_party": {
                    "facility_type": "residential_apartment"
                  }
                }
              }
            ],
            "parties": {
              "shipper": {
                "type": "business",
                "facility_type": "commercial_office"
              },
              "consignor": {
                "type": "business",
                "facility_type": "warehouse",
                "country_code": "FI",
                "address": {
                  "country_code": "FI"
                }
              },
              "consignee": {
                "type": "individual",
                "facility_type": "residential_apartment",
                "country_code": "FI",
                "address": {
                  "country_code": "FI"
                }
              },
              "payor": {
                "type": "organization",
                "facility_type": "depot",
                "country_code": "FI"
              },
              "delivery_party": {
                "type": "individual",
                "facility_type": "residential_apartment"
              }
            }
          }
        }
      }
    },
    "status": 200,
    "response": {
      "data": {
        "type": "rating-evaluation",
        "id": "01M660X1GD3TS6GX9Z7JRAM3RN",
        "attributes": {
          "operation": "EvaluateShippingOptions",
          "operation_code": "rate_quote",
          "shipping_options": [
            {
              "carrier_id": "carrier-pct-stacking-definition-percentage-stacking-fixture",
              "service_id": "svc-pct-stacking-definition-percentage-stacking-fixture",
              "canonical_service_key": "platform:carrier-pct-stacking-definition-percentage-stacking-fixture.svc-pct-stacking-definition-percentage-stacking-fixture",
              "presentation_identity_key": "parcel.pct_stacking",
              "service_names": [],
              "service_name": "",
              "sustainability_score": null,
              "capability_options": [],
              "price_components": [
                {
                  "kind": "surcharge",
                  "code": "pct-stacking-security-row-definition-percentage-stacking-fixture",
                  "scope": "shipment",
                  "scope_reference": null,
                  "amount": {
                    "amount": "0.63",
                    "currency_code": "EUR"
                  },
                  "calculation_basis": {
                    "ruleset_id": "01m660wxjc3bxn2rx5d4ss3tdb",
                    "ruleset_version": 1,
                    "rule_id": null,
                    "rule_version": null,
                    "logic": "pricing_profile",
                    "expression_tree": null,
                    "artifact_type": "pricing_adjustment_table",
                    "artifact_id": "01m660wwpcgtdhjf903hcwydav",
                    "artifact_code": "pct-stacking-security-adjustments-definition-percentage-stacking-fixture",
                    "artifact_version": 1,
                    "artifact_row_id": "01m660wwswf0sryyyxsm8kma64",
                    "artifact_row_code": "pct-stacking-security-row-definition-percentage-stacking-fixture",
                    "row_sequence": 1,
                    "amount_mode": "percentage",
                    "tax_treatment": "vat_bearing",
                    "percentage_basis_group_codes": [
                      "base_rate"
                    ],
                    "percentage_excluded_group_codes": [],
                    "percentage_basis_amount": 12.5,
                    "percentage_basis_context": null,
                    "minimum_amount": null,
                    "minimum_currency_code": null,
                    "maximum_amount": null
                  },
                  "_group_code": "security"
                },
                {
                  "kind": "base_rate",
                  "code": "pct-stacking-base-row-definition-percentage-stacking-fixture",
                  "scope": "shipment",
                  "scope_reference": null,
                  "amount": {
                    "amount": "12.50",
                    "currency_code": "EUR"
                  },
                  "calculation_basis": {
                    "ruleset_id": "01m660wxjc3bxn2rx5d4ss3tdb",
                    "ruleset_version": 1,
                    "rule_id": null,
                    "rule_version": null,
                    "logic": "pricing_tariff_grid",
                    "expression_tree": null,
                    "artifact_type": "pricing_tariff_grid",
                    "artifact_id": "01m660www2ry2s57nqq4g8pzs1",
                    "artifact_code": "pct-stacking-base-grid-definition-percentage-stacking-fixture",
                    "artifact_version": 1,
                    "artifact_row_id": "01m660www6gaz4hgfhssb7mtgb",
                    "artifact_row_code": "pct-stacking-base-row-definition-percentage-stacking-fixture",
                    "row_sequence": 1,
                    "offer_codes": [],
                    "resolved_zone_code": "A"
                  },
                  "_group_code": "base_rate"
                },
                {
                  "kind": "fuel",
                  "code": "pct-stacking-fuel-row-definition-percentage-stacking-fixture",
                  "scope": "shipment",
                  "scope_reference": null,
                  "amount": {
                    "amount": "1.25",
                    "currency_code": "EUR"
                  },
                  "calculation_basis": {
                    "ruleset_id": "01m660wxjc3bxn2rx5d4ss3tdb",
                    "ruleset_version": 1,
                    "rule_id": null,
                    "rule_version": null,
                    "logic": "pricing_profile",
                    "expression_tree": null,
                    "artifact_type": "pricing_surcharge_table",
                    "artifact_id": "01m660wwp7bxj8y2jcvc5sw76v",
                    "artifact_code": "pct-stacking-fuel-surcharge-definition-percentage-stacking-fixture",
                    "artifact_version": 1,
                    "artifact_row_id": "01m660wwp95g92xf8sdjp88mez",
                    "artifact_row_code": "pct-stacking-fuel-row-definition-percentage-stacking-fixture",
                    "row_sequence": 1,
                    "amount_mode": "percentage",
                    "tax_treatment": null,
                    "percentage_basis_group_codes": [
                      "base_rate"
                    ],
                    "percentage_excluded_group_codes": [],
                    "percentage_basis_amount": 12.5,
                    "percentage_basis_context": null,
                    "minimum_amount": null,
                    "minimum_currency_code": null,
                    "maximum_amount": null
                  },
                  "_group_code": "fuel"
                }
              ],
              "total_price": {
                "amount": "14.38",
                "currency_code": "EUR"
              },
              "transit": {
                "min_days": 0,
                "max_days": 0,
                "promised_date": null,
                "confidence": 0
              },
              "eligibility_trace": [],
              "legs": [
                {
                  "id": "leg_1",
                  "sequence": 1,
                  "transport_mode": "road",
                  "carrier_id": "carrier-pct-stacking-definition-percentage-stacking-fixture",
                  "service_id": "svc-pct-stacking-definition-percentage-stacking-fixture",
                  "origin": {
                    "country_code": "FI",
                    "postal_code": "00100"
                  },
                  "destination": {
                    "country_code": "FI",
                    "postal_code": "70800"
                  },
                  "parties": {
                    "payor": {
                      "type": "organization"
                    },
                    "delivery_party": {
                      "facility_type": "residential_apartment"
                    }
                  },
                  "package_ids": [
                    "pkg_1"
                  ],
                  "metrics": {
                    "derived": {
                      "package_count": 1,
                      "pallet_count": 0,
                      "total_loading_meters": 0,
                      "total_weight_canonical": 1,
                      "total_chargeable_weight_canonical": 1,
                      "total_freight_weight_canonical": 1,
                      "total_volume_canonical": 0.024,
                      "max_package_weight_canonical": 1,
                      "max_package_chargeable_weight_canonical": 1,
                      "max_package_volume_canonical": 0.024,
                      "max_package_width_canonical": 30,
                      "max_package_height_canonical": 20,
                      "max_package_linear_size_canonical": 90,
                      "max_longest_side_canonical": 40,
                      "max_package_length_plus_girth_canonical": 140
                    },
                    "effective": {
                      "package_count": 1,
                      "pallet_count": 0,
                      "total_loading_meters": 0,
                      "total_weight_canonical": 1,
                      "total_chargeable_weight_canonical": 1,
                      "total_freight_weight_canonical": 1,
                      "total_volume_canonical": 0.024,
                      "max_package_weight_canonical": 1,
                      "max_package_chargeable_weight_canonical": 1,
                      "max_package_volume_canonical": 0.024,
                      "max_package_width_canonical": 30,
                      "max_package_height_canonical": 20,
                      "max_package_linear_size_canonical": 90,
                      "max_longest_side_canonical": 40,
                      "max_package_length_plus_girth_canonical": 140
                    }
                  },
                  "price_components": [],
                  "total_price": {
                    "amount": "0.00",
                    "currency_code": "EUR"
                  },
                  "eligible": null
                }
              ]
            }
          ],
          "diagnostics": []
        }
      },
      "jsonapi": {
        "version": "1.1"
      },
      "meta": {
        "transport": {
          "content_type": "application/vnd.api+json"
        },
        "endpoint": {
          "endpoint_id": "api-rating-evaluate"
        },
        "contract": {
          "contract_version": "2026-03-22",
          "request_contract_version": "2026-03-22",
          "response_contract_version": "2026-03-22"
        },
        "decision": {
          "decision_id": "01M660X1GD3TS6GX9Z7JRAM3RN"
        },
        "idempotency": {
          "key": "idem-pct-stacking-definition",
          "status": "created",
          "replayed": false,
          "original_decision_id": null,
          "original_outcome_reference": null,
          "request_hash_algorithm": "sha256"
        },
        "decision_instant_at": "2026-10-30T09:05:24+00:00",
        "decision_instant_source": "admission_default"
      }
    }
  }
]
