Page 1 of 1

Routing with / without delivery flag

Posted: Fri Jan 09, 2026 11:15 am
by Bernd Welter
Hi folks,

in PTV xServer 2 it was possible to parametrize a vehicle as "legalCondition.isDelivery=true|false".
The Developer Routing API does not offer such a parameter, right?

A partner mentioned:
I would expect the API to return the DELIVERY_ONLY_EVENTS whcih I can use to perform some post processing.
How are clients supposed to define this in the Routing API?

Bernd

Re: Routing with / without delivery flag

Posted: Fri Jan 09, 2026 11:48 am
by Joost
I would expect the API to return the DELIVERY_ONLY_EVENTS which I can use to perform some post processing.
Add DELIVERY_ONLY_EVENTS or DELIVERY_ONLY_EVENTS_POLYLINE (if you want to visualize the delivery part on a map) to the results.

For example:
https://api.myptv.com/routing/v1/routes ... S_POLYLINE

Code: Select all

{
  "distance": 6621,
  "travelTime": 912,
  "trafficDelay": 0,
  "violated": false,
  "polyline": "{\"type\":\"LineString\",\"coordinates\":[[5.0121803882,52.09300499],[5.0121817398,52.093003121],[5.0123980061,52.092657658],[5.0124845126,52.092498212],[5.0127872854,52.092365341],[5.0129170452,52.092312192],[5.0133495778,52.092099596],[5.0139118702,52.092073021],[5.0141713897,52.092099596],[5.0144741626,52.092073021],[5.0146471756,52.092073021],[5.0147769354,52.092073021],[5.0145174158,52.091302353],[5.0144309093,52.091116327],[5.0143444028,52.090903726],[5.0143011495,52.090824],[5.0142578963,52.090717698],[5.01404163,52.090770849],[5.0138686169,52.090797424],[5.0125710191,52.091063177],[5.0114031811,52.091302353],[5.0101920899,52.091568102],[5.0097595573,52.091647826],[5.0095865443,52.091700976],[5.008548466,52.091886999],[5.0071211085,52.09217932],[5.0062560433,52.092365341],[5.0059965237,52.092418489],[5.0058235107,52.092445064],[5.0057802574,52.092365341],[5.0054342314,52.0917807],[5.0052179651,52.091328928],[5.0051314585,52.091142902],[5.005044952,52.091036602],[5.0049584455,52.090850575],[5.0046556727,52.090212764],[5.0040933803,52.088777654],[5.0040501271,52.088644772],[5.0040068738,52.088511888],[5.0034013282,52.086252813],[5.0033580749,52.086040189],[5.0031850619,52.08497705],[5.0032715684,52.084551787],[5.0031418086,52.084445471],[5.0032283151,52.084339155],[5.0031418086,52.084046783],[5.0027957825,52.082770956],[5.0027525293,52.082398833],[5.0025795162,52.081548255],[5.0025795162,52.081441932],[5.0024930097,52.081282446],[5.0021469836,52.080777404],[5.0019307174,52.080617916],[5.0016279445,52.080485009],[5.0013251717,52.080458428],[5.0012386652,52.080272357],[5.001368425,52.080192612],[5.0014549315,52.080139449],[5.0016711978,52.080166031],[5.0019739706,52.079953377],[5.0021469836,52.079820468],[5.0024065032,52.079501484],[5.0028390358,52.07896984],[5.0033148216,52.078491355],[5.0040501271,52.078145779],[5.0056072444,52.077800201],[5.0097595573,52.076896368],[5.0149932017,52.075779843],[5.0207458852,52.074743045],[5.0220434829,52.074530365],[5.0222597492,52.074477195],[5.0229085481,52.07439744],[5.0234275872,52.074477195],[5.0242493992,52.07471646],[5.0248981981,52.074875969],[5.0253739839,52.074902554],[5.02572001,52.074875969],[5.0261525426,52.074796214],[5.0263688089,52.074743045],[5.027060861,52.07461012],[5.0289207512,52.074264514],[5.029396537,52.074184759],[5.030564375,52.073972076],[5.0310834141,52.073865735],[5.0313429337,52.073812564],[5.0316024533,52.073759393],[5.031732213,52.073732808],[5.0330298108,52.073520123],[5.0339813825,52.073387195],[5.0360142857,52.073094752],[5.037225377,52.07290865],[5.0382634552,52.072749134],[5.039734066,52.072536445],[5.0415507029,52.072243996],[5.0425022746,52.072111064],[5.0427185409,52.072057891],[5.043064567,52.072031304],[5.0434105931,52.071978131],[5.0434538463,52.071871785],[5.0436268594,52.071792025],[5.0438431257,52.071898372],[5.0437566191,52.072057891],[5.0438863789,52.072323755],[5.0441026452,52.072749134],[5.0443621648,52.073254266],[5.0447946974,52.074105003],[5.0461788017,52.076790033],[5.0464815745,52.076896368],[5.0468276006,52.076896368],[5.0480819451,52.076657115],[5.0483847179,52.076603947],[5.0495525559,52.076364693],[5.0504176211,52.076178605],[5.0498436706,52.07505417]]}",
  "events": [
    {
      "latitude": 52.09300499,
      "longitude": 5.0121803882,
      "startsAt": "2026-01-09T12:41:50+01:00",
      "distanceFromStart": 0,
      "travelTimeFromStart": 0,
      "countryCode": "NL",
      "utcOffset": 60,
      "deliveryOnly": {
        "accessType": "ENTER",
        "relatedEventIndex": 1,
        "polyline": "{\"type\":\"LineString\",\"coordinates\":[[5.0121803882,52.09300499],[5.0121817398,52.093003121],[5.0123980061,52.092657658],[5.0124845126,52.092498212]]}"
      }
    },
    {
      "latitude": 52.092498212,
      "longitude": 5.0124845126,
      "startsAt": "2026-01-09T12:42:35+01:00",
      "distanceFromStart": 62,
      "travelTimeFromStart": 45,
      "countryCode": "NL",
      "utcOffset": 60,
      "deliveryOnly": {
        "accessType": "EXIT",
        "relatedEventIndex": 0
      }
    }
  ]
}
delivery.jpg

Re: Routing with / without delivery flag

Posted: Fri Jan 09, 2026 3:52 pm
by Bernd Welter
Feedback from Hugi:

In Developer Routing API all vehicles are "isDelivery" - but there malus values are depending on the profile.
And: in fact you can't override them via request.

If this info is critical for you we need to understand the usecase story behind this request:
  • What do you want to achieve?
  • Entering a street without any penalty?