-
Notifications
You must be signed in to change notification settings - Fork 5
/
Address.dtd
783 lines (782 loc) · 22.1 KB
/
Address.dtd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "https://github.com/route4me/route4me-json-schemas/blob/master/Address.dtd",
"title": "Address",
"description": "Json schema for an Address response class. See curl examples: get_route_directions, get_route_path_points",
"type": "object",
"properties": {
"route_destination_id": {
"type": "integer",
"title": "Route Destination ID",
"description": "Internal unique address identifier"
},
"alias": {
"type": "string",
"title": "Address Alias",
"description": "Address Alias"
},
"member_id": {
"type": "integer",
"title": "Member ID",
"description": "Member ID"
},
"address": {
"type": "string",
"title": "Address Name",
"description": "The route Address Line 1"
},
"is_depot": {
"type": "boolean",
"title": "Is Depot",
"description": "This address is a depot",
"default": false
},
"timeframe_violation_state": {
"type": "integer",
"title": "Timeframe violation state",
"description": "State of the timeframe violation. In a response only"
},
"timeframe_violation_time": {
"type": "integer",
"title": "Timeframe violation time",
"description": "Moment of the timeframe violation. In a response only"
},
"timeframe_violation_rate": {
"type": "number",
"title": "Timeframe violation rate",
"description": "Rate of the timeframe violation. In a response only"
},
"lat": {
"type": "number",
"title": "Latitude",
"description": "Latitude",
"minimum": -90,
"maximum": 90
},
"lng": {
"type": "number",
"title": "Longitude",
"description": "Longitude",
"minimum": -180,
"maximum": 180
},
"curbside_lat": {
"type": "number",
"title": "Curbside Latitude",
"description": "Curbside latitude",
"minimum": -90,
"maximum": 90
},
"curbside_lng": {
"type": "number",
"title": "Curbside Longitude",
"description": "Curbside longitude",
"minimum": -180,
"maximum": 180
},
"priority": {
"type": "integer",
"nullable": true,
"title": "Priority",
"description": "0 is the highest priority; n has higher priority than n + 1"
},
"route_id": {
"type": "string",
"title": "Route ID",
"description": "Parent route"
},
"original_route_id": {
"type": "string",
"nullable": true,
"title": "Original Route ID",
"description": "The original customer-specific route id assigned at route creation time."
},
"route_name": {
"type": "string",
"nullable": true,
"title": "Route Name",
"description": "Route name of a depot address"
},
"optimization_problem_id": {
"type": "string",
"title": "Optimization Problem ID",
"description": "Optimization Problem ID"
},
"sequence_no": {
"type": "integer",
"title": "Sequence No",
"description": "The sequence number for the address"
},
"geocoded": {
"type": "boolean",
"title": "Geocoded",
"description": "True means the 'address' field was successfully geocoded"
},
"preferred_geocoding": {
"type": "integer",
"nullable": true,
"title": "Preferred Geocoding",
"description": "Index of 'geocodings' array that the user has chosen"
},
"failed_geocoding": {
"type": "boolean",
"nullable": true,
"title": "Failed Geocoding",
"description": "True means there was a geocoding attempt which failed. False means success or no geocoding"
},
"geocodings": {
"type": "array",
"items": {
"$ref": "https://raw.githubusercontent.com/route4me/route4me-json-schemas/master/geocoding.json"
},
"title": "Geocodings ID"
},
"contact_id": {
"type": "integer",
"nullable": true,
"minimum": 0,
"title": "Contact ID",
"description": "Address book contact id (0 means not connected to the address book)"
},
"order_id": {
"type": "integer",
"nullable": true,
"title": "Order ID",
"description": "Parent order ID"
},
"address_stop_type": {
"type": "string",
"enum": ["DELIVERY","PICKUP","BREAK","MEETUP","SERVICE","VISIT","DRIVEBY"],
"title": "Address stop type",
"description": "The type of stop that this is (DELIVERY,PICKUP,BREAK,MEETUP,SERVICE,VISIT,DRIVEBY)"
},
"is_visited": {
"type": "boolean",
"title": "Is Visited",
"description": "The driver pressed the 'Visited' button",
"default": false
},
"timestamp_last_visited": {
"type": "integer",
"nullable": true,
"title": "Timestamp Last Vsited",
"description": "Timestamp when the driver presses 'Visited'"
},
"visited_lat": {
"type": "number",
"nullable": true,
"title": "Visited Latitude",
"description": "Last known check in latitude",
"minimum": -90,
"maximum": 90
},
"visited_lng": {
"type": "number",
"nullable": true,
"title": "Visited Longitude",
"description": "Last known check in longitude",
"minimum": -180,
"maximum": 180
},
"is_departed": {
"type": "boolean",
"title": "Is Departed",
"description": "The driver marked the 'Departed' button"
},
"departed_lat": {
"type": "number",
"nullable": true,
"title": "Departed Latitude",
"description": "Last known departed latitude",
"minimum": -90,
"maximum": 90
},
"departed_lng": {
"type": "number",
"nullable": true,
"description": "Last known departed longitude",
"title": "Departed Longitude",
"minimum": -180,
"maximum": 180
},
"timestamp_last_departed": {
"type": "integer",
"nullable": true,
"title": "Timestamp Last Departed",
"description": "Timestamp when the driver marks the stop as 'Departed'"
},
"group": {
"type": "string",
"nullable": true,
"title": "Group",
"description": "Address group"
},
"customer_po": {
"type": "string",
"nullable": true,
"title": "Customer PO",
"description": "The customer purchase order for the address"
},
"invoice_no": {
"type": "string",
"nullable": true,
"title": "Invoice No",
"description": "The invoice number for the address"
},
"reference_no": {
"type": "string",
"nullable": true,
"title": "Reference NO",
"description": "The reference number for the address"
},
"order_no": {
"type": "string",
"nullable": true,
"title": "Order NO",
"description": "The order number for the address"
},
"weight": {
"type": "number",
"title": "Weight",
"description": "The weight of the package (cargo) to dropof/pickup to/from the address. Number precise = 2 (e.g. 4.77)."
},
"cost": {
"type": "number",
"title": "Cost",
"description": "The cost of the order for the address. Number precise = 2 (e.g. 530.88)."
},
"revenue": {
"type": "number",
"title": "Revenue",
"description": "The total revenue for the address. Number precise = 2 (e.g. 4.77)."
},
"cube": {
"type": "number",
"title": "Cube",
"description": "The cubic volume of the cargo being delivered or picked up at the address. Number precise = 2 (e.g. 4.85)."
},
"pieces": {
"type": "integer",
"title": "Pieces",
"description": "Pieces"
},
"first_name": {
"type": "string",
"nullable": true,
"title": "First name",
"description": "The first name of the receiving address"
},
"last_name": {
"type": "string",
"nullable": true,
"title": "Last name",
"description": "The last name of the receiving address"
},
"email": {
"type": "string",
"nullable": true,
"format": "email",
"title": "Email",
"description": "A valid e-mail address assigned to this stop"
},
"phone": {
"type": "string",
"nullable": true,
"title": "Phone",
"description": "Customer Phone"
},
"destination_note_count": {
"type": "integer",
"title": "Destination Note Count",
"description": "How many notes have been added to this destination"
},
"drive_time_to_next_destination": {
"type": "integer",
"title": "Drive Time to next Destination",
"description": "Time to next destination in seconds."
},
"abnormal_traffic_time_to_next_destination": {
"type": "integer",
"nullable": true,
"description": "Abnormal traffic time to next destination",
"title": "Abnormal traffic time to next destination"
},
"uncongested_time_to_next_destination": {
"type": "integer",
"nullable": true,
"title": "Uncongested Time To Next Destination",
"description": "Supposing that there was no traffic at all, this gives how many seconds it takes to get to the next stop."
},
"traffic_time_to_next_destination": {
"type": "integer",
"nullable": true,
"title": "Traffic Time To Next Destination",
"description": "Traffic time to a next destination."
},
"distance_to_next_destination": {
"type": "number",
"title": "Distance to next destination",
"description": "Distance to next destination in route unit (the default unit is in miles)"
},
"udu_distance_to_next_destination": {
"type": "number",
"title": "UDU Distance To Next Destination",
"description": "UDU distance to next destination in route unit (the default unit is in miles)"
},
"channel_name": {
"type": "string",
"title": "Channel name",
"description": "Channel name"
},
"pickup": {
"type": "string",
"title": "Pickup",
"description": "Alias of a pickup point."
},
"dropoff": {
"type": "string",
"title": "Dropoff",
"description": "Alias of the paired pickup point."
},
"joint": {
"type": "integer",
"title": "Joint",
"description": "If equal to 1, the pickup and dropoff addresses are joint (one by one despite the regular pickup-dropoff addresses when it's possible to have multiple pickup addresses with one dropoff address)."
},
"generated_time_window_start": {
"type": "integer",
"nullable": true,
"title": "Generated Time Window Start",
"description": "Generated Time Window Start in seconds"
},
"generated_time_window_end": {
"type": "integer",
"nullable": true,
"title": "Generated Time Window End",
"description": "Generated Time Window End in seconds"
},
"time_window_start": {
"type": "integer",
"nullable": true,
"title": "Time Window Start",
"description": "Time Window Start in seconds, relative to the route start date (midnight), UTC time zone. It is relative to start datebecause start time changes would shift time windows"
},
"time_window_end": {
"type": "integer",
"nullable": true,
"title": "Time Window End",
"description": "Time Window End in seconds, relative to the route start date (midnight), UTC time zone. It is relative to start datebecause start time changes would shift time windows"
},
"time_window_start_2": {
"type": "integer",
"nullable": true,
"title": "Time Window Start 2",
"description": "See time_window_start"
},
"time_window_end_2": {
"type": "integer",
"nullable": true,
"title": "Time Window End 2",
"description": "See time_window_end"
},
"geofence_detected_visited_timestamp": {
"type": "integer",
"nullable": true,
"title": "Geofence detected visited timestamp",
"description": "Timestamp of a geofence detected visited"
},
"geofence_detected_departed_timestamp": {
"type": "integer",
"nullable": true,
"title": "Geofence detected departed timestamp",
"description": "Timestamp of a geofence detected departed"
},
"geofence_detected_service_time": {
"type": "integer",
"nullable": true,
"title": "Geofence detected service time",
"description": "The service time of a detected geofence"
},
"geofence_detected_visited_lat": {
"type": "number",
"nullable": true,
"title": "Geofence detected visited lat",
"description": "Latitude of a visited detected geofence",
"minimum": -90,
"maximum": 90
},
"geofence_detected_visited_lng": {
"type": "number",
"nullable": true,
"title": "Geofence detected visited lng",
"description": "Longitude of a visited detected geofence",
"minimum": -180,
"maximum": 180
},
"geofence_detected_departed_lat": {
"type": "number",
"nullable": true,
"title": "Geofence detected departed lat",
"description": "Latitude of a departed detected geofence",
"minimum": -90,
"maximum": 90
},
"geofence_detected_departed_lng": {
"type": "number",
"nullable": true,
"title": "Geofence detected departed lng",
"description": "Longitude of a departed detected geofence",
"minimum": -180,
"maximum": 180
},
"time": {
"type": "integer",
"title": "Time",
"description": "Service time (seconds)"
},
"tracking_number": {
"type": "string",
"title": "Tracking Number",
"description": "Systemwide unique code, which permits end-users (recipients) to track the status of their order"
},
"custom_fields": {
"type": "object",
"additionalProperties": { "type": "string" },
"description": "Any unrecognized fields from the original CSV upload will be found here",
"title": "Custom Fields"
},
"custom_fields_str_json": {
"type": "string",
"title": "Custom fields JSON string",
"description": "JSON string representation of the custom fields"
},
"custom_fields_config": {
"type": "object",
"nullable": true,
"additionalProperties": {"type": "string"},
"title": "Custom fields configuration",
"description": "Configuration of the custom fields"
},
"custom_fields_config_str_json": {
"type": "string",
"nullable": true,
"title": "Custom fields config JSON string",
"description": "JSON string representation of the custom fields configuration"
},
"notes": {
"type": "array",
"items": {
"$ref": "https://raw.githubusercontent.com/route4me/route4me-json-schemas/master/note.json"
},
"title": "Notes",
"description": "Notes"
},
"bundle_count": {
"type": "integer",
"title": "Bundle Count",
"description": "Count of the bundled addresses."
},
"bundle_items": {
"type": "object",
"readOnly": true,
"title": "Bundle Items",
"description": "Additional bundle items",
"properties": {
"cube": {
"type": "number",
"title": "Cube",
"description": "Summary cube value of the bundled addresses."
},
"revenue": {
"type": "number",
"title": "Revenue",
"description": "Summary revenue value of the bundled addresses."
},
"pieces": {
"type": "integer",
"title": "Pieces",
"description": "Summary pieces value of the bundled addresses."
},
"weight": {
"type": "number",
"title": "Weight",
"description": "Summary weight value of the bundled addresses."
},
"cost": {
"type": "number",
"title": "Cost",
"description": "Summary cost value of the bundled addresses."
},
"service_time": {
"type": "integer",
"title": "Service Time",
"description": "Service time of the bundled addresses."
},
"time_window_start": {
"type": "integer",
"title": "Time Window Start",
"description": "Time window start of the bundled addresses."
},
"time_window_end": {
"type": "integer",
"title": "Time Window End",
"description": "Time window end of the bundled addresses."
},
"custom_data": {
"type": "array",
"items": {
"type": "string"
},
"title": "Custom Data",
"description": "Custom data"
},
"addresses_id": {
"type": "array",
"items": {
"type": "integer"
},
"title": "Addresses IDs",
"description": "Array of the IDs of the bundeld addresses."
}
}
},
"order_inventory": {
"type": "array",
"items": {
"type": "object",
"properties": {
"inventory_id": {
"type": "integer",
"title": "Inventory ID",
"description": "Unique inventory ID"
},
"order_id": {
"type": "integer",
"title": "Order ID",
"description": "Unique order ID"
},
"name": {
"type": "string",
"title": "Name",
"description": "Order inventory name"
},
"quantity": {
"type": "integer",
"title": "Quantity",
"description": "An order inventory quantity"
},
"total_weight": {
"type": "number",
"title": "Total Weight",
"description": "Total weight of the inventory"
},
"total_volume": {
"type": "number",
"title": "Total Volume",
"description": "Total volume of the inventory"
},
"total_cost": {
"type": "number",
"title": "Total Cost",
"description": "Total cost of the inventory"
},
"total_price": {
"type": "number",
"title": "Total Price",
"description": "Total price of the inventory"
},
"created_at": {
"type": "string",
"title": "Created At",
"description": "When the inventory created"
},
"updated_at": {
"type": "string",
"title": "Updated At",
"description": "When the inventory updated"
}
}
}
},
"path_to_next": {
"type": "array",
"items": {
"type": "object",
"properties": {
"lat": {
"type": "number",
"title": "Latitude",
"description": "Latitude",
"minimum": -90,
"maximum": 90
},
"lng": {
"type": "number",
"title": "Longitude",
"description": "Longitude",
"minimum": -180,
"maximum": 180
}
}
}
},
"required_skills": {
"type": "array",
"items": { "type": "string" },
"title": "Required Skills",
"description": "Required skills of a driver"
},
"required_skills": {
"type": "array",
"items": { "type": "string" },
"title": "Required Skills",
"description": "Required skills of a driver"
},
"additional_status": {
"type": "string",
"nullable": true,
"title": "Additional Status",
"description": "Additional Status of the address"
},
"wait_time_to_next_destination": {
"type": "integer",
"title": "Wait time to next destination",
"description": "Wait time to next destination"
},
"manifest": {
"type": "object",
"properties": {
"estimated_wait_time_before_tw_open": {
"type": "integer",
"title": "Estimated Wait Time Before TW Open",
"description": "Estimated wait time before TW open"
},
"running_service_time": {
"type": "integer",
"title": "Running Service Time",
"description": "How much time is to be spent on service from the start in seconds"
},
"running_travel_time": {
"type": "integer",
"title": "Running Travel Time",
"description": "How much time is spent driving from the start in seconds"
},
"running_wait_time": {
"type": "integer",
"title": "Running Wait Time",
"description": "Running Wait Time"
},
"running_distance": {
"type": "number",
"title": "Running Distance",
"description": "Distance traversed before reaching this address"
},
"udu_running_distance": {
"type": "number",
"title": "UDU Running Distance",
"description": "UDU distance traversed before reaching this address"
},
"fuel_from_start": {
"type": "number",
"title": "Fuel From Start",
"description": "Fuel From Start"
},
"fuel_cost_from_start": {
"type": "number",
"title": "Fuel Cost From Start",
"description": "Fuel Cost From Start"
},
"projected_arrival_time_ts": {
"type": "integer",
"title": "Projected Arrival Time ts",
"description": "Projected arrival time UTC unixtime"
},
"projected_departure_time_ts": {
"type": "integer",
"title": "Projected Departure Time ts",
"description": "Estimated departure time UTC unixtime"
},
"actual_arrival_time_ts": {
"type": "integer",
"nullable": true,
"title": "Actual Arrival Time ts",
"description": "Time when the address was marked as visited UTC unixtime. This is actually equal to timestamp_last_visited most of the time."
},
"actual_departure_time_ts": {
"type": "integer",
"nullable": true,
"title": "Actual Departure Time ts",
"description": "Time when the address was mared as departed UTC. This is actually equal to timestamp_last_departed most of the time."
},
"estimated_arrival_time_ts": {
"type": "integer",
"title": "Estimated Arrival Time ts",
"description": "Estimated arrival time based on the current route progress, i.e. based on the last known actual_arrival_time"
},
"estimated_departure_time_ts": {
"type": "integer",
"title": "Estimated Departure Time ts",
"description": "Estimated departure time based on the current route progress"
},
"scheduled_arrival_time_ts": {
"type": "integer",
"title": "Scheduled Arrival Time ts",
"description": "Scheduled arrival time of a vehicle to this destination"
},
"scheduled_departure_time_ts": {
"type": "integer",
"title": "Scheduled Departure Time ts",
"description": "Scheduled departure time of a vehicle from this destination"
},
"time_impact": {
"type": "integer",
"nullable": true,
"title": "Time Impact",
"description": "This is the difference between the originally projected arrival time and Actual Arrival Time"
},
"arrival_on_time": {
"type": "boolean",
"title": "Arrival On Time",
"description": "If true, a vehicle arrived on time at the address"
},
"arrival_deviation_seconds": {
"type": "integer",
"title": "Arrival Deviation Seconds",
"description": "Arrival deviation in seconds."
},
"departure_on_time": {
"type": "boolean",
"title": "Departure On Time",
"description": "If true, a vehicle departed on time from the address."
},
"departure_deviation_seconds": {
"type": "integer",
"title": "Departure Deviation Seconds",
"description": "Departure deviation in seconds."
},
"remaining_weight": {
"type": "number",
"title": "Remaining Weight",
"description": "Remaining weight."
},
"remaining_cube": {
"type": "number",
"title": "Remaining Cube",
"description": "Remaining cube (volume)."
},
"remaining_pieces": {
"type": "integer",
"title": "Remaining Pieces",
"description": "Remaining pieces."
},
"remaining_revenue": {
"type": "number",
"title": "Remaining Revenue",
"description": "Remaining revenue."
}
},
"description": "The manifest contains values derived from other values",
"title": "Manifest"
}
}
}