Configure shipments
Introduction
Try ExampleIn this example we will build an example using the shipments object.
Pickup object: Indicates where to pickup a shipment and other related information.
- service: Indicates how much time will be spent in the actual pickup. For example, it could take 90 seconds from reaching a pickup location, pick up the shipment, and return to the vehicle. Here we assume we need 120 seconds to work for a pickup.
- time_windows: Indicates the period during which the delivery needs to be made. The value type used is the UNIX timestamp. Here, we assume we need to do the pickup between 1661770800 [GMT: Monday, August 29, 2022, 11:00:00 AM] and 1661792400 [GMT: Monday, August 29, 2022, 5:00:00 PM].
- priority: Set the priority of a job. The priority here will not affect the order of jobs but only influence whether this job will be assigned. Here, we assume each of their priorities is 1.
delivery: Indicates where to deliver a shipment and other related information.
- service: Indicates how much time will be spent operating a job. For example, it could take 90 seconds from reaching a pickup location, pick up the shipment, and return to the vehicle. Here, we assume we need 120 seconds for completing a delivery.
- time_windows: Indicates the period between which the delivery needs to be made. The value type used is the UNIX timestamp. Here, we assume we need to do the delivery between 1661770800 [GMT: Monday, August 29, 2022, 11:00:00 AM] and 1661792400 [GMT: Monday, August 29, 2022, 5:00:00 PM].
- amount: Indicates how many passengers/cargo will be picked up and delivered. It is multidimensional and can represent amounts for different kinds of items. Here, we assume we only have 1 kind of item in this shipment.
- skills: Describes the skills such as driving licenses and transportation certificate requirements needed for completion of the shipment. It is a positive integer array. Here, we have a shipment that requires skills 1 and 2. Internally, the values could represent skills representative of your use case.
Request Example
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
{ "locations": { "id": 1, "description": "Test Shipment", "location": "40.82013,-73.87622|40.72203,-73.97584|40.81031,-73.92569|40.68547,-73.9935|40.57697,-73.9727|40.76398,-73.84215|40.89673,-73.7944|40.82951,-73.9282|40.7553,-73.7560|40.6998,-73.80726|40.630855,-73.95247" }, "shipments": [ { "pickup": { "id": 1, "location_index": 0, "service": 120, "time_windows": [ [ 1661770800, 1661792400 ] ], "priority": 1 }, "delivery": { "id": 1, "location_index": 1, "service": 120, "time_windows": [ [ 1661770800, 1661792400 ] ], "priority": 1 }, "amount": [ 1 ] }, { "pickup": { "id": 2, "location_index": 2, "service": 120, "time_windows": [ [ 1661770800, 1661792400 ] ], "priority": 1 }, "delivery": { "id": 2, "location_index": 3, "service": 120, "time_windows": [ [ 1661770800, 1661792400 ] ], "priority": 1 }, "amount": [ 1 ], "skills": [1,2] }, { "pickup": { "id": 3, "location_index": 4, "service": 120, "time_windows": [ [ 1661770800, 1661792400 ] ], "priority": 1 }, "delivery": { "id": 3, "location_index": 5, "service": 120, "time_windows": [ [ 1661770800, 1661792400 ] ], "priority": 1 }, "amount": [ 1 ] } ], "vehicles": [ { "id": 1, "start_index": 8, "capacity": [ 1 ], "time_window": [ 1661770800, 1661792400 ], "skills": [1,2,3] }, { "id": 2, "start_index": 6, "capacity": [ 1 ], "time_window": [ 1661770800, 1661792400 ] } ] }