{
  "schema_version": "1.0",
  "organization": "p2-data-lab",
  "portal": "p2-freight-compliance-calc",
  "live_meta_url": "https://p2-freight-compliance-calc.pages.dev/data/meta.json",
  "openapi_url": "https://p2-freight-compliance-calc.pages.dev/openapi.json",
  "public_datasets": [
    "https://p2-freight-compliance-calc.pages.dev/data/freight-indices.json",
    "https://p2-freight-compliance-calc.pages.dev/data/iso14083-factors.json",
    "https://p2-freight-compliance-calc.pages.dev/data/port-throughput.json"
  ],
  "calculator_inputs_schema": {
    "legs": {
      "label": "Multimodal Transport Chain Legs (Pre-Carriage Road/Rail + Main-Carriage Sea/Air + On-Carriage)",
      "type": "array",
      "default": "Shanghai -> Rotterdam (Deep Sea 19,550 km) + Rotterdam -> Munich (Heavy Truck Euro VI 830 km)"
    },
    "cargo_mass_tonnes": {
      "label": "Actual Gross Cargo Mass (Metric Tonnes)",
      "type": "number",
      "default": 44,
      "min": 0.1,
      "max": 50000
    },
    "container_type_count": {
      "label": "Container / ULD Allocation",
      "type": "object",
      "default": {
        "type": "40HC",
        "count": 2,
        "reefer": false
      }
    },
    "fuel_pathway": {
      "label": "Main-Carriage Fuel Pathway (ISO-14083 WTW)",
      "type": "select",
      "default": "VLSFO_HFO",
      "options": [
        "VLSFO_HFO",
        "MGO",
        "LNG_OTTO",
        "BIO_METHANOL",
        "JET_A1",
        "SAF_30_BLEND",
        "ULSD_DIESEL",
        "HVO100"
      ]
    },
    "eu_ets_voyage_scope": {
      "label": "EU ETS Maritime Voyage Scope",
      "type": "select",
      "default": "EXTRA_EEA_PORT_CALL_50PCT",
      "options": [
        "INTRA_EEA_100PCT",
        "EXTRA_EEA_PORT_CALL_50PCT",
        "NON_EEA_0PCT"
      ]
    },
    "eua_carbon_price_eur": {
      "label": "EU Allowance (EUA) Carbon Price (EUR / tCO2e)",
      "type": "number",
      "default": 68.5,
      "min": 20,
      "max": 250
    },
    "port_dwell_days": {
      "label": "Total Terminal Dwell Days (Demurrage)",
      "type": "number",
      "default": 9,
      "min": 0,
      "max": 60
    },
    "equipment_detention_days": {
      "label": "Out-of-Gate Container Return Days (Detention)",
      "type": "number",
      "default": 7,
      "min": 0,
      "max": 60
    },
    "free_days_demurrage": {
      "label": "Contracted Demurrage Free Days",
      "type": "number",
      "default": 4,
      "min": 0,
      "max": 21
    },
    "free_days_detention": {
      "label": "Contracted Detention Free Days",
      "type": "number",
      "default": 5,
      "min": 0,
      "max": 21
    }
  },
  "formulas_summary": {
    "iso14083_leg_tkm": "TKM_i = cargo_mass_tonnes * (D_planned_i * DAF_i + D_offset_i), where ISO-14083 Distance Adjustment Factor DAF = 1.0 (actual sea route) or +95 km Great Circle offset for air legs",
    "iso14083_wtw_emissions_kg": "E_WTW = sum_i( TKM_i * (EF_TTW_i + EF_WTT_i) * (1 + r_reefer_uplift_i) * (1 / LF_empty_repositioning_i) )",
    "eu_ets_maritime_liability_eur": "C_EU_ETS = (E_TTW_sea_tonnes * Scope_Factor * PhaseIn_2026_1.00) * eua_carbon_price_eur, where Scope_Factor in {1.0, 0.5, 0.0}",
    "fueleu_maritime_penalty_eur": "P_FuelEU = max(0, (GHG_Intensity_Actual - GHG_Target_89.34_gCO2e_MJ) * Energy_MJ) / (GHG_Intensity_Actual * 41000) * 2400",
    "stepped_demurrage_detention_usd": "C_DD = N_containers * r_reefer_dd_mult * ( sum_{d = free_dem + 1}^{dwell}(TierRate_dem(d)) + sum_{d = free_det + 1}^{det}(TierRate_det(d)) ) * (PPI_Port_Latest / PPI_Port_Base)",
    "index_linked_baf_fsc": "BAF_adj = Base_Freight * alpha_fuel * ((WPU057303_Latest / WPU057303_ContractBase) - 1)",
    "total_compliance_adjusted_freight_usd": "Total_USD = Base_Freight + BAF_adj + C_DD + (C_EU_ETS + P_FuelEU) * FX_USD_per_EUR"
  },
  "pro_api_endpoint": "https://p2-core-api.evsmtoken.workers.dev/v1/pro/p2-freight-compliance-calc/dataset",
  "auth_header": "Authorization: Bearer <POLAR_LICENSE_KEY>",
  "purchase_tiers": [
    {
      "sku_key": "freight_compliance_dataset",
      "product_id": "01c3c99e-be1a-455f-bb9c-7ceb1c7cfb69",
      "name": "Multimodal Freight PPI/SPPI & ISO-14083 Dataset (CSV/JSON)",
      "price_usd": 39,
      "billing": "one_time",
      "checkout_url": "https://buy.polar.sh/polar_cl_0Z8flWhgFStNTbDu2XgwUG3xgQrG2kvwiFvL30M9vUT"
    },
    {
      "sku_key": "freight_pro_license",
      "product_id": "ece58ab7-69f7-452a-9aad-60fa8daf0278",
      "name": "Pro ISO-14083 / EU ETS Batch Shipment & API License Key",
      "price_usd": 29,
      "billing": "month",
      "checkout_url": "https://buy.polar.sh/polar_cl_T7LpN3Y4nuIm71fp4lgpq5WbTbrRvg9wLDqnQ0msu5l"
    },
    {
      "sku_key": "freight_rfp_audit_pack",
      "product_id": "0e0b4a1e-5b4a-4339-8747-36421474a298",
      "name": "Shipper Freight RFP Indexation & CSRD Scope-3 Audit Pack",
      "price_usd": 99,
      "billing": "one_time",
      "checkout_url": "https://buy.polar.sh/polar_cl_u2GHVqan8CBVjMmsE4rhH8Sac1HFGCXmrdBib0YV9A3"
    }
  ],
  "master_all_portals_pass": {
    "master_all_portals_pro_monthly": {
      "product_id": "18e0b844-b764-41f0-9c3d-186362784997",
      "name": "All-Portals Master Pro API & Batch CSV License Key (Monthly)",
      "price_usd": 79,
      "billing": "monthly",
      "checkout_url": "https://buy.polar.sh/polar_cl_0P1axu2nXEDXECK8Z0k7I3sMndeo3hsdqpepv1LUcJT"
    },
    "enterprise_annual_data_pass": {
      "product_id": "8a5266eb-3aaf-4fb3-9aef-0e5bbfd17dc3",
      "name": "Annual Enterprise FinOps & Compliance Data Pass (All Portals)",
      "price_usd": 499,
      "billing": "yearly",
      "checkout_url": "https://buy.polar.sh/polar_cl_SPWfsAxuQAVHif3soxwqbq5zPAdNZFkN5CtQK3cZRft"
    }
  }
}