ガイドAPIリファレンス
ガイド

複数の通行料金システムプロバイダーにまたがる通行料金

📘

ルートの通行料金情報のリクエストは、追加のトランザクションとしてカウントされます。

複数の料金システムプロバイダー、支払いは1回

料金所間のルート部分 (入口 - 中間地点の料金所/通過料金所 - 出口) は、複数の通行料金システムプロバイダーにまたがる可能性があります。レスポンスパラメーターsections[*].tolls[*].tollSystemsは複数のシステムをサポートしています。これは複数のシステムプロバイダーにまたがる通行料金を表し、通行料金は1回支払われます。

次のルートは、2つの通行料金システムにまたがる通行料金のユースケースを表しています。

通行料金が2つの通行料金システムにまたがるルートの画像
  • 出発点はポイントAで、目的地はポイントBです。
  • 3つのマークの付いた位置に伸びる区間Location 01/02/03は、関連付けられた単一の通行料金を持つ区間を表します。
  • 位置0102の間の区間、span Aは、system-Aに関連付けられています。
  • 位置 0203 の間の区間、span B は、system-B に関連付けられています。
  • 全体の区間 span A + B の通行料金には単一のコストがあります。この通行料金のtollSystemsにはsystem-Asystem-Bの両方が含まれます。
📘

このルートリクエストの例では、システムの通行料金サマリーがリクエストされた場合、個々のシステムの通行料金の合計が実際の合計通行料金よりも高くなります。その理由は、span A + Bの単一の料金がsystem-Asystem-Bの両方のサマリーに含まれるためです。

リクエスト

curl -gX GET 'https://router.hereapi.com/v8/routes?'\
'origin=44.242084,-0.907024&'\
'destination=47.712973,1.478985&'\
'return=summary,polyline,tolls,travelSummary&'\
'currency=EUR&'\
'spans=tollSystems&'\
'transportMode=truck&'\
'routingMode=fast&'\
'vehicle[grossWeight]=40000&'\
'vehicle[type]=tractor&'\
'departureTime=any&'\
'tolls[transponders]=all&'\
'tolls[vignettes]=all&'\
'tolls[summaries]=total,tollSystem&'\
'tolls[emissionType]=euro5&'\
'apiKey=YOUR_API_KEY'

レスポンス

ルートレスポンスには以下が含まれます。

  • 合計通行料金:155.6 EUR
  • システムの通行料金サマリー:
    • TollSystem_0:23.3 EUR
    • TollSystem_1:103.3 EUR
    • TollSystem_2:132.3 EUR

レスポンスから、料金103.3 EURTollSystem_1TollSystem_2の両方のシステムに2重に含まれていることがわかります。これは、通行料金が両方のシステムに関連付けられているのに、支払いが1回であるためです。

{
  "routes": [
    {
      "id": "686f8c89-ec55-4ddc-9474-4c907e4ff0d4",
      "sections": [
        {
          "id": "81efb15b-f257-49e8-b4be-6e7d334debf3",
          ...,
          "summary": {
            ...,
            "tolls": {
              "total": {
                "type": "value",
                "currency": "EUR",
                "value": 155.6
              },
              "totalBySystem": [
                {
                  "tollSystem": 0,
                  "price": {
                    "type": "value",
                    "currency": "EUR",
                    "value": 23.3
                  }
                },
                {
                  "tollSystem": 1,
                  "price": {
                    "type": "value",
                    "currency": "EUR",
                    "value": 103.3
                  }
                },
                {
                  "tollSystem": 2,
                  "price": {
                    "type": "value",
                    "currency": "EUR",
                    "value": 132.3
                  }
                }
              ]
            }
          },
          "travelSummary": {...},
          "polyline": "...",
          "spans": [
            {
              "offset": 0
            },
            {
              "offset": 188,
              "tollSystems": [
                0
              ]
            },
            {
              "offset": 418
            },
            {
              "offset": 2403,
              "tollSystems": [
                1
              ]
            },
            {
              "offset": 5920,
              "tollSystems": [
                2
              ]
            },
            {
              "offset": 7158,
              "tollSystems": [
                1,
                2
              ]
            },
            {
              "offset": 7159,
              "tollSystems": [
                2
              ]
            },
            {
              "offset": 7497
            },
            {
              "offset": 7640,
              "tollSystems": [
                2
              ]
            },
            {
              "offset": 8717
            }
          ],
          "transport": {
            "mode": "truck"
          },
          "tolls": [
            {
              "countryCode": "FRA",
              "tollSystemRef": 0,
              "tollSystem": "ATLANDES",
              "tollSystems": [
                0
              ],
              "fares": [
                {
                  "id": "b8f7aa71-8430-4bcd-9481-d642c1df4485",
                  "name": "ATLANDES",
                  "price": {
                    "type": "value",
                    "currency": "EUR",
                    "value": 23.3
                  },
                  ...
                }
              ],
              ...
            },
            {
              "countryCode": "FRA",
              "tollSystemRef": 2,
              "tollSystem": "COFIROUTE",
              "tollSystems": [
                2,
                1
              ],
              "fares": [
                {
                  "id": "28f6a887-c199-404f-8646-7063bf456be7",
                  "name": "COFIROUTE",
                  "price": {
                    "type": "value",
                    "currency": "EUR",
                    "value": 103.3
                  },
                  ...
                }
              ],
              "tollCollectionLocations": [
                {
                  "name": "VIRSAC",
                  "location": {
                    "lat": 45.02377,
                    "lng": -0.43499
                  }
                },
                {
                  "name": "TOURS-C/SORIGNY",
                  "location": {
                    "lat": 47.21845,
                    "lng": 0.65794
                  }
                }
              ]
            },
            {
              "countryCode": "FRA",
              "tollSystemRef": 2,
              "tollSystem": "COFIROUTE",
              "tollSystems": [
                2
              ],
              "fares": [
                {
                  "id": "c325a1c7-b075-4ad0-9224-d19948f5a656",
                  "name": "COFIROUTE",
                  "price": {
                    "type": "value",
                    "currency": "EUR",
                    "value": 29.0
                  },
                  ...
                }
              ],
              "tollCollectionLocations": [
                {
                  "name": "TOURS-C/MONNAIE",
                  "location": {
                    "lat": 47.49009,
                    "lng": 0.81952
                  }
                },
                {
                  "name": "MER",
                  "location": {
                    "lat": 47.72876,
                    "lng": 1.50842
                  }
                }
              ]
            }
          ],
          "tollSystems": [
            {
              "name": "ATLANDES"
            },
            {
              "name": "ASF"
            },
            {
              "name": "COFIROUTE"
            }
          ]
        }
      ]
    }
  ]
}

複数のプロバイダーがあり、料金が異なる

  • ルートセクションには複数の通行料金 (sections[*].tolls) がある場合があり、通行料金には複数の固有の料金 (sections[*].tolls[*].fares) が含まれている場合があります。
  • 1 つの通行料金システムに関連付けられた通行料金の場合、料金 name は通行料金システム名と同じです。
  • ただし、複数の通行料金システムに関連付けられた通行料金の場合、料金 name は 1 つの通行料金システム名のみを返します。通行料金に関連付けられているすべての通行料金システムの名前を取得するには、sections[*].tolls[*].tollSystems を使用します。sections[*].tolls[*].tollSystems内のインデックスはsections[*].tollSystems内のデータを参照します。
{
  ...,
  "tollSystemRef": 2,
  "tollSystem": "COFIROUTE",
  "tollSystems": [
    2,
    1
  ],
  ...,
  "fares": [
    {
      "id": "28f6a887-c199-404f-8646-7063bf456be7",
      "name": "COFIROUTE",
      "price": {
        "type": "value",
        "currency": "EUR",
        "value": 103.3
      }
    }
  ],
  ...
}
📘

この例では、通行料金が複数のシステムプロバイダーにまたがっているため、料金は複数のシステム (2と1) に関連付けられています。通行料金は複数のシステムに関連付けられていますが、プロパティtolls[*].tollSystemReftolls[*].tollSystemtolls[*].fares[*].nameは1つの通行料金システムのみに対応しているため、2/COFIROUTEを返します。これらのプロパティは、複数の通行料金システムがある場合に不完全な情報を返すため、非推奨となっています。完全な情報を得るには、tolls[*].tollSystemsを参照してください。