Search for content

Quick Start - Data API

With the Data service you can obtain additional data such as vehicle profiles.

Using the Data API is simple. Follow the steps on this page to get started with requesting data. For an easy integration you can also use the clients for Java, C# and TypeScript on GitHub.

Please note the individual rate and request limits for each API. You can find all limits in our FAQ.

API Endpoint

To get you started we will use the following endpoint, that will request all available predefined profiles.

https://api.myptv.com/data/v1/vehicle-profiles/predefined

 

Request

You can test this by entering the URL into your web browser (be sure to replace YOUR_API_KEY with your actual API key).

https://api.myptv.com/data/v1/vehicle-profiles/predefined?apiKey=YOUR_API_KEY

Alternatively you can choose one of the following options to send your request. You also have the option to send the API key in the request header.

cURL:
curl --location --request GET "https://api.myptv.com/data/v1/vehicle-profiles/predefined" --header "ApiKey: YOUR_API_KEY"

PowerShell:

$headers = @{"apiKey" = "YOUR_API_KEY"}
$Uri = "https://api.myptv.com/data/v1/vehicle-profiles/predefined"
$response = Invoke-RestMethod -Uri $uri -Method Get -Headers $headers
$response | ConvertTo-Json

Get your free API Access Key

Response

Below you will find an extract of the response representing one single predefined vehicle profile.

{
{
  "profiles": [
    {
      "name": "EUR_TRAILER_TRUCK",
      "description": "Typical 40t semi-trailer truck (Euro-tractor) with 5 axles consisting of tractor with 2 or 3 axles but no loading area and semi-trailer with 2 or 3 axles",
      "region": "EUROPE",
      "vehicle": {
        "engineType": "COMBUSTION",
        "fuelType": "DIESEL",
        "averageFuelConsumption": 35,
        "bioFuelRatio": 0,
        "cylinderCapacity": 12000,
        "emissionStandard": "EURO_6",
        "co2EmissionClass": 1,
        "lowEmissionZoneTypes": [
          "DE_GREEN"
        ],
        "particleReductionClass": "PMK_0",
        "emptyWeight": 15000,
        "loadWeight": 25000,
        "totalPermittedWeight": 40000,
        "axleWeight": 11500,
        "numberOfAxles": 5,
        "numberOfTires": 10,
        "height": 400,
        "heightAboveFrontAxle": 400,
        "length": 1650,
        "width": 254,
        "hazardousMaterials": [],
        "tunnelRestrictionCode": "NONE",
        "truckRoutes": [],
        "commercial": false,
        "etcSubscriptions": []
      },
      "currency": "EUR",
      "monetaryCostOptions": {
        "costPerKilometer": 2,
        "workingCostPerHour": 20
      }
    }
  ]
}