@utdk/openrouteservice 2.0.0-20260530.2-dev.646adf4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/openapi.json ADDED
@@ -0,0 +1,1228 @@
1
+ {
2
+ "openapi": "3.0.3",
3
+ "info": {
4
+ "title": "OpenRouteService API",
5
+ "description": "Open-source routing, geocoding, isochrone, distance-matrix, and VRP optimization API\nbuilt on OpenStreetMap. Pelias powers geocoding; Vroom powers optimization.\n\nThis spec covers the endpoints commonly used for back-end agent workflows\n(geocoding, matrices for VRP solvers, route ETAs, isochrones, full VRP solve).\nThe full ORS surface (POIs, snap-to-road, elevation, optimization advanced\nconstraints) can be added incrementally — see notes in the catalog entry.\n\nThe hosted free API (`https://api.openrouteservice.org`) exposes routing,\nmatrix, isochrones, optimization, and geocoding. Self-hosted ORS Docker\ncovers the ORS backend endpoints (routing, matrix, isochrones, optimization);\ngeocoding is hosted-public-API only.\n\nAuth: pass the API key in the `Authorization` header. Sign up free at\nhttps://openrouteservice.org/dev/#/signup.\n\nRate limits (free plan, hosted): 2,000 directions/day, 500 matrix/day,\n500 optimization/day, 500 isochrones/day, 1,000 geocode/day, 40/min on\nmost endpoints. Self-hosted backend endpoints: no hosted request caps.\n",
6
+ "version": "v2",
7
+ "contact": {
8
+ "name": "OpenRouteService",
9
+ "url": "https://openrouteservice.org"
10
+ }
11
+ },
12
+ "servers": [
13
+ {
14
+ "url": "https://api.openrouteservice.org",
15
+ "description": "Hosted free API (requires API key)"
16
+ }
17
+ ],
18
+ "security": [
19
+ {
20
+ "apiKey": []
21
+ }
22
+ ],
23
+ "tags": [
24
+ {
25
+ "name": "directions",
26
+ "description": "Route between two or more points with ETA, distance, and geometry."
27
+ },
28
+ {
29
+ "name": "matrix",
30
+ "description": "Many-to-many duration / distance matrix. Primary input for VRP solvers."
31
+ },
32
+ {
33
+ "name": "isochrones",
34
+ "description": "Reachable-area polygons by time or distance."
35
+ },
36
+ {
37
+ "name": "optimization",
38
+ "description": "VRP solver (Vroom backend). Assign N jobs to M vehicles optimally."
39
+ },
40
+ {
41
+ "name": "geocode",
42
+ "description": "Pelias forward and reverse geocoding."
43
+ }
44
+ ],
45
+ "paths": {
46
+ "/v2/directions/{profile}": {
47
+ "post": {
48
+ "operationId": "getDirections",
49
+ "summary": "Compute a route between coordinates",
50
+ "description": "Returns the ordered route, total duration, total distance, and turn-by-turn\nsteps. Use `driving-hgv` for service vans / heavy-goods routing (better\nbridge-weight and turn-restriction handling than `driving-car`).\n",
51
+ "tags": [
52
+ "directions"
53
+ ],
54
+ "parameters": [
55
+ {
56
+ "$ref": "#/components/parameters/Profile"
57
+ }
58
+ ],
59
+ "requestBody": {
60
+ "required": true,
61
+ "content": {
62
+ "application/json": {
63
+ "schema": {
64
+ "$ref": "#/components/schemas/DirectionsRequest"
65
+ }
66
+ }
67
+ }
68
+ },
69
+ "responses": {
70
+ "200": {
71
+ "description": "Route computed",
72
+ "content": {
73
+ "application/json": {
74
+ "schema": {
75
+ "$ref": "#/components/schemas/DirectionsResponse"
76
+ }
77
+ }
78
+ }
79
+ },
80
+ "400": {
81
+ "$ref": "#/components/responses/BadRequest"
82
+ },
83
+ "401": {
84
+ "$ref": "#/components/responses/Unauthorized"
85
+ },
86
+ "429": {
87
+ "$ref": "#/components/responses/RateLimited"
88
+ }
89
+ }
90
+ }
91
+ },
92
+ "/v2/matrix/{profile}": {
93
+ "post": {
94
+ "operationId": "getMatrix",
95
+ "summary": "Many-to-many duration / distance matrix",
96
+ "description": "Returns an N×M matrix of durations (seconds) and/or distances (metres) between\nall origin / destination pairs. This is the primary input for a Vehicle Routing\nProblem solver — feed the matrix into or-tools VRPTW.\n\nFree-plan limits: 3,500 locations per request total (origins × destinations),\nor 25 with `metrics: ['duration', 'distance']`.\n",
97
+ "tags": [
98
+ "matrix"
99
+ ],
100
+ "parameters": [
101
+ {
102
+ "$ref": "#/components/parameters/Profile"
103
+ }
104
+ ],
105
+ "requestBody": {
106
+ "required": true,
107
+ "content": {
108
+ "application/json": {
109
+ "schema": {
110
+ "$ref": "#/components/schemas/MatrixRequest"
111
+ }
112
+ }
113
+ }
114
+ },
115
+ "responses": {
116
+ "200": {
117
+ "description": "Matrix computed",
118
+ "content": {
119
+ "application/json": {
120
+ "schema": {
121
+ "$ref": "#/components/schemas/MatrixResponse"
122
+ }
123
+ }
124
+ }
125
+ },
126
+ "400": {
127
+ "$ref": "#/components/responses/BadRequest"
128
+ },
129
+ "401": {
130
+ "$ref": "#/components/responses/Unauthorized"
131
+ },
132
+ "429": {
133
+ "$ref": "#/components/responses/RateLimited"
134
+ }
135
+ }
136
+ }
137
+ },
138
+ "/v2/isochrones/{profile}": {
139
+ "post": {
140
+ "operationId": "getIsochrones",
141
+ "summary": "Reachable-area polygons by time or distance",
142
+ "description": "Returns one polygon per requested location × range — the area reachable\nwithin the given travel time (seconds) or distance (metres). Useful for\ndefining service zones, dispatcher catchment analysis, and SLA-feasibility\nchecks at a glance.\n",
143
+ "tags": [
144
+ "isochrones"
145
+ ],
146
+ "parameters": [
147
+ {
148
+ "$ref": "#/components/parameters/Profile"
149
+ }
150
+ ],
151
+ "requestBody": {
152
+ "required": true,
153
+ "content": {
154
+ "application/json": {
155
+ "schema": {
156
+ "$ref": "#/components/schemas/IsochronesRequest"
157
+ }
158
+ }
159
+ }
160
+ },
161
+ "responses": {
162
+ "200": {
163
+ "description": "Isochrones computed",
164
+ "content": {
165
+ "application/json": {
166
+ "schema": {
167
+ "$ref": "#/components/schemas/IsochronesResponse"
168
+ }
169
+ }
170
+ }
171
+ },
172
+ "400": {
173
+ "$ref": "#/components/responses/BadRequest"
174
+ },
175
+ "401": {
176
+ "$ref": "#/components/responses/Unauthorized"
177
+ },
178
+ "429": {
179
+ "$ref": "#/components/responses/RateLimited"
180
+ }
181
+ }
182
+ }
183
+ },
184
+ "/optimization": {
185
+ "post": {
186
+ "operationId": "solveOptimization",
187
+ "summary": "Solve a Vehicle Routing Problem (Vroom)",
188
+ "description": "Assigns jobs to vehicles optimally, minimising total travel time subject\nto time windows, skill matching, capacity, and breaks. Backed by Vroom.\n\nFree-plan limits: 50 jobs, 3 vehicles per request. Self-hosted ORS has no\nsuch caps. For larger problems, run or-tools VRPTW locally and use only\nthe `/v2/matrix/*` endpoint here.\n",
189
+ "tags": [
190
+ "optimization"
191
+ ],
192
+ "requestBody": {
193
+ "required": true,
194
+ "content": {
195
+ "application/json": {
196
+ "schema": {
197
+ "$ref": "#/components/schemas/OptimizationRequest"
198
+ }
199
+ }
200
+ }
201
+ },
202
+ "responses": {
203
+ "200": {
204
+ "description": "Optimised plan",
205
+ "content": {
206
+ "application/json": {
207
+ "schema": {
208
+ "$ref": "#/components/schemas/OptimizationResponse"
209
+ }
210
+ }
211
+ }
212
+ },
213
+ "400": {
214
+ "$ref": "#/components/responses/BadRequest"
215
+ },
216
+ "401": {
217
+ "$ref": "#/components/responses/Unauthorized"
218
+ },
219
+ "429": {
220
+ "$ref": "#/components/responses/RateLimited"
221
+ }
222
+ }
223
+ }
224
+ },
225
+ "/geocode/search": {
226
+ "get": {
227
+ "operationId": "geocodeSearch",
228
+ "summary": "Forward geocode an address or place name",
229
+ "description": "Pelias forward geocoder. Converts a free-text address into one or more\ncandidate coordinates with provenance, confidence, and structured address\ncomponents. Restrict to a country with `boundary.country` (ISO 3166-1\nalpha-2 or alpha-3) for higher-quality matches.\n",
230
+ "tags": [
231
+ "geocode"
232
+ ],
233
+ "parameters": [
234
+ {
235
+ "in": "query",
236
+ "name": "text",
237
+ "required": true,
238
+ "schema": {
239
+ "type": "string"
240
+ },
241
+ "description": "Free-form address or place name."
242
+ },
243
+ {
244
+ "in": "query",
245
+ "name": "focus.point.lon",
246
+ "schema": {
247
+ "type": "number",
248
+ "format": "double"
249
+ },
250
+ "description": "Longitude to bias results toward."
251
+ },
252
+ {
253
+ "in": "query",
254
+ "name": "focus.point.lat",
255
+ "schema": {
256
+ "type": "number",
257
+ "format": "double"
258
+ },
259
+ "description": "Latitude to bias results toward."
260
+ },
261
+ {
262
+ "in": "query",
263
+ "name": "boundary.country",
264
+ "schema": {
265
+ "type": "string"
266
+ },
267
+ "description": "ISO 3166-1 country code to restrict results to (e.g. `AU`)."
268
+ },
269
+ {
270
+ "in": "query",
271
+ "name": "size",
272
+ "schema": {
273
+ "type": "integer",
274
+ "default": 10,
275
+ "minimum": 1,
276
+ "maximum": 40
277
+ },
278
+ "description": "Maximum candidates to return."
279
+ }
280
+ ],
281
+ "responses": {
282
+ "200": {
283
+ "description": "Geocode candidates",
284
+ "content": {
285
+ "application/json": {
286
+ "schema": {
287
+ "$ref": "#/components/schemas/GeocodeResponse"
288
+ }
289
+ }
290
+ }
291
+ },
292
+ "400": {
293
+ "$ref": "#/components/responses/BadRequest"
294
+ },
295
+ "401": {
296
+ "$ref": "#/components/responses/Unauthorized"
297
+ },
298
+ "429": {
299
+ "$ref": "#/components/responses/RateLimited"
300
+ }
301
+ }
302
+ }
303
+ },
304
+ "/geocode/reverse": {
305
+ "get": {
306
+ "operationId": "geocodeReverse",
307
+ "summary": "Reverse-geocode a coordinate into an address",
308
+ "description": "Returns the nearest known address(es) for a given coordinate. Pelias-backed.\n",
309
+ "tags": [
310
+ "geocode"
311
+ ],
312
+ "parameters": [
313
+ {
314
+ "in": "query",
315
+ "name": "point.lon",
316
+ "required": true,
317
+ "schema": {
318
+ "type": "number",
319
+ "format": "double"
320
+ },
321
+ "description": "Longitude."
322
+ },
323
+ {
324
+ "in": "query",
325
+ "name": "point.lat",
326
+ "required": true,
327
+ "schema": {
328
+ "type": "number",
329
+ "format": "double"
330
+ },
331
+ "description": "Latitude."
332
+ },
333
+ {
334
+ "in": "query",
335
+ "name": "size",
336
+ "schema": {
337
+ "type": "integer",
338
+ "default": 10,
339
+ "minimum": 1,
340
+ "maximum": 40
341
+ },
342
+ "description": "Maximum candidates to return."
343
+ },
344
+ {
345
+ "in": "query",
346
+ "name": "boundary.circle.radius",
347
+ "schema": {
348
+ "type": "number",
349
+ "format": "double"
350
+ },
351
+ "description": "Restrict to this radius (km) around the point."
352
+ }
353
+ ],
354
+ "responses": {
355
+ "200": {
356
+ "description": "Reverse-geocode candidates",
357
+ "content": {
358
+ "application/json": {
359
+ "schema": {
360
+ "$ref": "#/components/schemas/GeocodeResponse"
361
+ }
362
+ }
363
+ }
364
+ },
365
+ "400": {
366
+ "$ref": "#/components/responses/BadRequest"
367
+ },
368
+ "401": {
369
+ "$ref": "#/components/responses/Unauthorized"
370
+ },
371
+ "429": {
372
+ "$ref": "#/components/responses/RateLimited"
373
+ }
374
+ }
375
+ }
376
+ }
377
+ },
378
+ "components": {
379
+ "securitySchemes": {
380
+ "apiKey": {
381
+ "type": "apiKey",
382
+ "in": "header",
383
+ "name": "Authorization",
384
+ "description": "Free key from https://openrouteservice.org/dev/#/signup. Pass the raw key\nas the `Authorization` header value (no `Bearer ` prefix). The CLI reads\nthe key from the `ORS_API_KEY` environment variable.\n"
385
+ }
386
+ },
387
+ "parameters": {
388
+ "Profile": {
389
+ "in": "path",
390
+ "name": "profile",
391
+ "required": true,
392
+ "schema": {
393
+ "type": "string",
394
+ "enum": [
395
+ "driving-car",
396
+ "driving-hgv",
397
+ "cycling-regular",
398
+ "cycling-mountain",
399
+ "cycling-road",
400
+ "cycling-electric",
401
+ "foot-walking",
402
+ "foot-hiking",
403
+ "wheelchair"
404
+ ]
405
+ },
406
+ "description": "Routing profile. `driving-hgv` is the right pick for service vans / utility\nvehicles — it respects bridge weight, low-clearance, and large-vehicle turn\nrestrictions that `driving-car` ignores.\n"
407
+ }
408
+ },
409
+ "schemas": {
410
+ "Coordinate": {
411
+ "type": "array",
412
+ "description": "[lon, lat] pair, decimal degrees, WGS84.",
413
+ "items": {
414
+ "type": "number",
415
+ "format": "double"
416
+ },
417
+ "minItems": 2,
418
+ "maxItems": 2
419
+ },
420
+ "DirectionsRequest": {
421
+ "type": "object",
422
+ "required": [
423
+ "coordinates"
424
+ ],
425
+ "properties": {
426
+ "coordinates": {
427
+ "type": "array",
428
+ "minItems": 2,
429
+ "maxItems": 50,
430
+ "items": {
431
+ "$ref": "#/components/schemas/Coordinate"
432
+ },
433
+ "description": "Ordered route waypoints. First is origin, last is destination."
434
+ },
435
+ "alternative_routes": {
436
+ "type": "object",
437
+ "properties": {
438
+ "target_count": {
439
+ "type": "integer",
440
+ "minimum": 1,
441
+ "maximum": 3
442
+ },
443
+ "weight_factor": {
444
+ "type": "number",
445
+ "format": "double"
446
+ },
447
+ "share_factor": {
448
+ "type": "number",
449
+ "format": "double"
450
+ }
451
+ }
452
+ },
453
+ "units": {
454
+ "type": "string",
455
+ "enum": [
456
+ "m",
457
+ "km",
458
+ "mi"
459
+ ],
460
+ "default": "m"
461
+ },
462
+ "language": {
463
+ "type": "string",
464
+ "description": "Localisation for textual turn instructions (e.g. `en-AU`)."
465
+ },
466
+ "instructions": {
467
+ "type": "boolean",
468
+ "default": true
469
+ },
470
+ "elevation": {
471
+ "type": "boolean",
472
+ "default": false
473
+ },
474
+ "preference": {
475
+ "type": "string",
476
+ "enum": [
477
+ "fastest",
478
+ "shortest",
479
+ "recommended"
480
+ ],
481
+ "default": "fastest"
482
+ },
483
+ "radiuses": {
484
+ "type": "array",
485
+ "items": {
486
+ "type": "number"
487
+ },
488
+ "description": "Per-waypoint snap-radius (m). Use -1 to disable snapping for that point."
489
+ }
490
+ }
491
+ },
492
+ "DirectionsResponse": {
493
+ "type": "object",
494
+ "properties": {
495
+ "routes": {
496
+ "type": "array",
497
+ "items": {
498
+ "type": "object",
499
+ "properties": {
500
+ "summary": {
501
+ "type": "object",
502
+ "properties": {
503
+ "distance": {
504
+ "type": "number",
505
+ "format": "double",
506
+ "description": "Total distance, units depend on `units` request field."
507
+ },
508
+ "duration": {
509
+ "type": "number",
510
+ "format": "double",
511
+ "description": "Total duration in seconds."
512
+ }
513
+ }
514
+ },
515
+ "geometry": {
516
+ "type": "string",
517
+ "description": "Polyline-encoded geometry (precision 5)."
518
+ },
519
+ "segments": {
520
+ "type": "array",
521
+ "items": {
522
+ "type": "object",
523
+ "properties": {
524
+ "distance": {
525
+ "type": "number",
526
+ "format": "double"
527
+ },
528
+ "duration": {
529
+ "type": "number",
530
+ "format": "double"
531
+ },
532
+ "steps": {
533
+ "type": "array",
534
+ "items": {
535
+ "type": "object",
536
+ "additionalProperties": true
537
+ }
538
+ }
539
+ }
540
+ }
541
+ },
542
+ "bbox": {
543
+ "type": "array",
544
+ "items": {
545
+ "type": "number",
546
+ "format": "double"
547
+ }
548
+ },
549
+ "way_points": {
550
+ "type": "array",
551
+ "items": {
552
+ "type": "integer"
553
+ }
554
+ }
555
+ }
556
+ }
557
+ },
558
+ "bbox": {
559
+ "type": "array",
560
+ "items": {
561
+ "type": "number",
562
+ "format": "double"
563
+ }
564
+ },
565
+ "metadata": {
566
+ "type": "object",
567
+ "additionalProperties": true
568
+ }
569
+ }
570
+ },
571
+ "MatrixRequest": {
572
+ "type": "object",
573
+ "required": [
574
+ "locations"
575
+ ],
576
+ "properties": {
577
+ "locations": {
578
+ "type": "array",
579
+ "minItems": 2,
580
+ "items": {
581
+ "$ref": "#/components/schemas/Coordinate"
582
+ },
583
+ "description": "All locations participating in the matrix."
584
+ },
585
+ "sources": {
586
+ "type": "array",
587
+ "items": {
588
+ "type": "integer"
589
+ },
590
+ "description": "Indices into `locations` to use as origins. Omit to use all locations."
591
+ },
592
+ "destinations": {
593
+ "type": "array",
594
+ "items": {
595
+ "type": "integer"
596
+ },
597
+ "description": "Indices into `locations` to use as destinations. Omit to use all locations."
598
+ },
599
+ "metrics": {
600
+ "type": "array",
601
+ "items": {
602
+ "type": "string",
603
+ "enum": [
604
+ "duration",
605
+ "distance"
606
+ ]
607
+ },
608
+ "default": [
609
+ "duration"
610
+ ]
611
+ },
612
+ "units": {
613
+ "type": "string",
614
+ "enum": [
615
+ "m",
616
+ "km",
617
+ "mi"
618
+ ],
619
+ "default": "m"
620
+ },
621
+ "resolve_locations": {
622
+ "type": "boolean",
623
+ "default": false
624
+ }
625
+ }
626
+ },
627
+ "MatrixResponse": {
628
+ "type": "object",
629
+ "properties": {
630
+ "durations": {
631
+ "type": "array",
632
+ "description": "N×M matrix of durations in seconds.",
633
+ "items": {
634
+ "type": "array",
635
+ "items": {
636
+ "type": "number",
637
+ "format": "double",
638
+ "nullable": true
639
+ }
640
+ }
641
+ },
642
+ "distances": {
643
+ "type": "array",
644
+ "description": "N×M matrix of distances (units per request).",
645
+ "items": {
646
+ "type": "array",
647
+ "items": {
648
+ "type": "number",
649
+ "format": "double",
650
+ "nullable": true
651
+ }
652
+ }
653
+ },
654
+ "sources": {
655
+ "type": "array",
656
+ "items": {
657
+ "type": "object",
658
+ "additionalProperties": true
659
+ }
660
+ },
661
+ "destinations": {
662
+ "type": "array",
663
+ "items": {
664
+ "type": "object",
665
+ "additionalProperties": true
666
+ }
667
+ },
668
+ "metadata": {
669
+ "type": "object",
670
+ "additionalProperties": true
671
+ }
672
+ }
673
+ },
674
+ "IsochronesRequest": {
675
+ "type": "object",
676
+ "required": [
677
+ "locations",
678
+ "range"
679
+ ],
680
+ "properties": {
681
+ "locations": {
682
+ "type": "array",
683
+ "minItems": 1,
684
+ "maxItems": 5,
685
+ "items": {
686
+ "$ref": "#/components/schemas/Coordinate"
687
+ }
688
+ },
689
+ "range": {
690
+ "type": "array",
691
+ "items": {
692
+ "type": "number",
693
+ "format": "double"
694
+ },
695
+ "description": "Time (seconds) or distance (metres) thresholds. One polygon per value, per location."
696
+ },
697
+ "range_type": {
698
+ "type": "string",
699
+ "enum": [
700
+ "time",
701
+ "distance"
702
+ ],
703
+ "default": "time"
704
+ },
705
+ "interval": {
706
+ "type": "number",
707
+ "format": "double",
708
+ "description": "Optional sub-interval to densify the response."
709
+ },
710
+ "attributes": {
711
+ "type": "array",
712
+ "items": {
713
+ "type": "string",
714
+ "enum": [
715
+ "area",
716
+ "reachfactor",
717
+ "total_pop"
718
+ ]
719
+ }
720
+ },
721
+ "smoothing": {
722
+ "type": "number",
723
+ "format": "double",
724
+ "minimum": 0,
725
+ "maximum": 100,
726
+ "default": 0
727
+ }
728
+ }
729
+ },
730
+ "IsochronesResponse": {
731
+ "type": "object",
732
+ "properties": {
733
+ "type": {
734
+ "type": "string"
735
+ },
736
+ "bbox": {
737
+ "type": "array",
738
+ "items": {
739
+ "type": "number",
740
+ "format": "double"
741
+ }
742
+ },
743
+ "features": {
744
+ "type": "array",
745
+ "items": {
746
+ "type": "object",
747
+ "properties": {
748
+ "type": {
749
+ "type": "string"
750
+ },
751
+ "properties": {
752
+ "type": "object",
753
+ "additionalProperties": true
754
+ },
755
+ "geometry": {
756
+ "type": "object",
757
+ "additionalProperties": true
758
+ }
759
+ }
760
+ }
761
+ },
762
+ "metadata": {
763
+ "type": "object",
764
+ "additionalProperties": true
765
+ }
766
+ }
767
+ },
768
+ "OptimizationRequest": {
769
+ "type": "object",
770
+ "required": [
771
+ "jobs",
772
+ "vehicles"
773
+ ],
774
+ "properties": {
775
+ "jobs": {
776
+ "type": "array",
777
+ "items": {
778
+ "type": "object",
779
+ "required": [
780
+ "id",
781
+ "location"
782
+ ],
783
+ "properties": {
784
+ "id": {
785
+ "type": "integer"
786
+ },
787
+ "location": {
788
+ "type": "array",
789
+ "items": {
790
+ "type": "number",
791
+ "format": "double"
792
+ },
793
+ "minItems": 2,
794
+ "maxItems": 2
795
+ },
796
+ "service": {
797
+ "type": "integer",
798
+ "description": "On-site service duration in seconds."
799
+ },
800
+ "amount": {
801
+ "type": "array",
802
+ "items": {
803
+ "type": "integer"
804
+ },
805
+ "description": "Capacity demand vector (matches vehicle.capacity dimensions)."
806
+ },
807
+ "skills": {
808
+ "type": "array",
809
+ "items": {
810
+ "type": "integer"
811
+ }
812
+ },
813
+ "time_windows": {
814
+ "type": "array",
815
+ "items": {
816
+ "type": "array",
817
+ "items": {
818
+ "type": "integer",
819
+ "description": "Unix epoch seconds."
820
+ },
821
+ "minItems": 2,
822
+ "maxItems": 2
823
+ }
824
+ },
825
+ "priority": {
826
+ "type": "integer",
827
+ "minimum": 0,
828
+ "maximum": 100
829
+ }
830
+ }
831
+ }
832
+ },
833
+ "vehicles": {
834
+ "type": "array",
835
+ "items": {
836
+ "type": "object",
837
+ "required": [
838
+ "id",
839
+ "profile"
840
+ ],
841
+ "properties": {
842
+ "id": {
843
+ "type": "integer"
844
+ },
845
+ "profile": {
846
+ "type": "string",
847
+ "enum": [
848
+ "driving-car",
849
+ "driving-hgv",
850
+ "cycling-regular",
851
+ "cycling-mountain",
852
+ "cycling-road",
853
+ "cycling-electric",
854
+ "foot-walking",
855
+ "foot-hiking",
856
+ "wheelchair"
857
+ ]
858
+ },
859
+ "start": {
860
+ "type": "array",
861
+ "items": {
862
+ "type": "number",
863
+ "format": "double"
864
+ },
865
+ "minItems": 2,
866
+ "maxItems": 2
867
+ },
868
+ "end": {
869
+ "type": "array",
870
+ "items": {
871
+ "type": "number",
872
+ "format": "double"
873
+ },
874
+ "minItems": 2,
875
+ "maxItems": 2
876
+ },
877
+ "capacity": {
878
+ "type": "array",
879
+ "items": {
880
+ "type": "integer"
881
+ }
882
+ },
883
+ "skills": {
884
+ "type": "array",
885
+ "items": {
886
+ "type": "integer"
887
+ }
888
+ },
889
+ "time_window": {
890
+ "type": "array",
891
+ "items": {
892
+ "type": "integer"
893
+ },
894
+ "minItems": 2,
895
+ "maxItems": 2
896
+ },
897
+ "breaks": {
898
+ "type": "array",
899
+ "items": {
900
+ "type": "object",
901
+ "properties": {
902
+ "id": {
903
+ "type": "integer"
904
+ },
905
+ "service": {
906
+ "type": "integer"
907
+ },
908
+ "time_windows": {
909
+ "type": "array",
910
+ "items": {
911
+ "type": "array",
912
+ "items": {
913
+ "type": "integer"
914
+ },
915
+ "minItems": 2,
916
+ "maxItems": 2
917
+ }
918
+ }
919
+ }
920
+ }
921
+ }
922
+ }
923
+ }
924
+ },
925
+ "options": {
926
+ "type": "object",
927
+ "properties": {
928
+ "g": {
929
+ "type": "boolean",
930
+ "description": "Include route geometries in response."
931
+ }
932
+ }
933
+ }
934
+ }
935
+ },
936
+ "OptimizationResponse": {
937
+ "type": "object",
938
+ "properties": {
939
+ "code": {
940
+ "type": "integer",
941
+ "description": "0 = success."
942
+ },
943
+ "summary": {
944
+ "type": "object",
945
+ "properties": {
946
+ "cost": {
947
+ "type": "integer"
948
+ },
949
+ "duration": {
950
+ "type": "integer"
951
+ },
952
+ "distance": {
953
+ "type": "integer"
954
+ },
955
+ "unassigned": {
956
+ "type": "integer"
957
+ },
958
+ "service": {
959
+ "type": "integer"
960
+ },
961
+ "waiting_time": {
962
+ "type": "integer"
963
+ }
964
+ }
965
+ },
966
+ "routes": {
967
+ "type": "array",
968
+ "items": {
969
+ "type": "object",
970
+ "properties": {
971
+ "vehicle": {
972
+ "type": "integer"
973
+ },
974
+ "steps": {
975
+ "type": "array",
976
+ "items": {
977
+ "type": "object",
978
+ "properties": {
979
+ "type": {
980
+ "type": "string",
981
+ "enum": [
982
+ "start",
983
+ "job",
984
+ "break",
985
+ "end"
986
+ ]
987
+ },
988
+ "location": {
989
+ "type": "array",
990
+ "items": {
991
+ "type": "number",
992
+ "format": "double"
993
+ }
994
+ },
995
+ "job": {
996
+ "type": "integer"
997
+ },
998
+ "service": {
999
+ "type": "integer"
1000
+ },
1001
+ "waiting_time": {
1002
+ "type": "integer"
1003
+ },
1004
+ "arrival": {
1005
+ "type": "integer"
1006
+ },
1007
+ "duration": {
1008
+ "type": "integer"
1009
+ }
1010
+ }
1011
+ }
1012
+ },
1013
+ "cost": {
1014
+ "type": "integer"
1015
+ },
1016
+ "duration": {
1017
+ "type": "integer"
1018
+ },
1019
+ "distance": {
1020
+ "type": "integer"
1021
+ },
1022
+ "service": {
1023
+ "type": "integer"
1024
+ },
1025
+ "waiting_time": {
1026
+ "type": "integer"
1027
+ },
1028
+ "geometry": {
1029
+ "type": "string"
1030
+ }
1031
+ }
1032
+ }
1033
+ },
1034
+ "unassigned": {
1035
+ "type": "array",
1036
+ "items": {
1037
+ "type": "object",
1038
+ "properties": {
1039
+ "id": {
1040
+ "type": "integer"
1041
+ },
1042
+ "location": {
1043
+ "type": "array",
1044
+ "items": {
1045
+ "type": "number",
1046
+ "format": "double"
1047
+ }
1048
+ },
1049
+ "reason": {
1050
+ "type": "string"
1051
+ }
1052
+ }
1053
+ }
1054
+ }
1055
+ }
1056
+ },
1057
+ "GeocodeResponse": {
1058
+ "type": "object",
1059
+ "properties": {
1060
+ "type": {
1061
+ "type": "string",
1062
+ "enum": [
1063
+ "FeatureCollection"
1064
+ ]
1065
+ },
1066
+ "bbox": {
1067
+ "type": "array",
1068
+ "items": {
1069
+ "type": "number",
1070
+ "format": "double"
1071
+ }
1072
+ },
1073
+ "features": {
1074
+ "type": "array",
1075
+ "items": {
1076
+ "type": "object",
1077
+ "properties": {
1078
+ "type": {
1079
+ "type": "string"
1080
+ },
1081
+ "geometry": {
1082
+ "type": "object",
1083
+ "properties": {
1084
+ "type": {
1085
+ "type": "string",
1086
+ "enum": [
1087
+ "Point"
1088
+ ]
1089
+ },
1090
+ "coordinates": {
1091
+ "type": "array",
1092
+ "items": {
1093
+ "type": "number",
1094
+ "format": "double"
1095
+ },
1096
+ "minItems": 2,
1097
+ "maxItems": 2
1098
+ }
1099
+ }
1100
+ },
1101
+ "properties": {
1102
+ "type": "object",
1103
+ "properties": {
1104
+ "id": {
1105
+ "type": "string"
1106
+ },
1107
+ "gid": {
1108
+ "type": "string"
1109
+ },
1110
+ "layer": {
1111
+ "type": "string"
1112
+ },
1113
+ "source": {
1114
+ "type": "string"
1115
+ },
1116
+ "name": {
1117
+ "type": "string"
1118
+ },
1119
+ "confidence": {
1120
+ "type": "number",
1121
+ "format": "double"
1122
+ },
1123
+ "accuracy": {
1124
+ "type": "string"
1125
+ },
1126
+ "country": {
1127
+ "type": "string"
1128
+ },
1129
+ "country_a": {
1130
+ "type": "string",
1131
+ "description": "ISO 3166 alpha-3."
1132
+ },
1133
+ "region": {
1134
+ "type": "string"
1135
+ },
1136
+ "locality": {
1137
+ "type": "string"
1138
+ },
1139
+ "street": {
1140
+ "type": "string"
1141
+ },
1142
+ "housenumber": {
1143
+ "type": "string"
1144
+ },
1145
+ "postalcode": {
1146
+ "type": "string"
1147
+ },
1148
+ "label": {
1149
+ "type": "string",
1150
+ "description": "Human-readable full address."
1151
+ }
1152
+ }
1153
+ }
1154
+ }
1155
+ }
1156
+ },
1157
+ "geocoding": {
1158
+ "type": "object",
1159
+ "additionalProperties": true
1160
+ }
1161
+ }
1162
+ },
1163
+ "ApiError": {
1164
+ "type": "object",
1165
+ "properties": {
1166
+ "error": {
1167
+ "type": "object",
1168
+ "properties": {
1169
+ "code": {
1170
+ "type": "integer"
1171
+ },
1172
+ "message": {
1173
+ "type": "string"
1174
+ }
1175
+ }
1176
+ },
1177
+ "info": {
1178
+ "type": "object",
1179
+ "properties": {
1180
+ "engine": {
1181
+ "type": "object",
1182
+ "additionalProperties": true
1183
+ },
1184
+ "attribution": {
1185
+ "type": "string"
1186
+ },
1187
+ "timestamp": {
1188
+ "type": "integer"
1189
+ }
1190
+ }
1191
+ }
1192
+ }
1193
+ }
1194
+ },
1195
+ "responses": {
1196
+ "BadRequest": {
1197
+ "description": "Malformed request",
1198
+ "content": {
1199
+ "application/json": {
1200
+ "schema": {
1201
+ "$ref": "#/components/schemas/ApiError"
1202
+ }
1203
+ }
1204
+ }
1205
+ },
1206
+ "Unauthorized": {
1207
+ "description": "API key missing or invalid",
1208
+ "content": {
1209
+ "application/json": {
1210
+ "schema": {
1211
+ "$ref": "#/components/schemas/ApiError"
1212
+ }
1213
+ }
1214
+ }
1215
+ },
1216
+ "RateLimited": {
1217
+ "description": "Per-minute or daily quota exhausted",
1218
+ "content": {
1219
+ "application/json": {
1220
+ "schema": {
1221
+ "$ref": "#/components/schemas/ApiError"
1222
+ }
1223
+ }
1224
+ }
1225
+ }
1226
+ }
1227
+ }
1228
+ }