• Optimization
  • Navigation
  • Tracking
  • Maps
  • Places

Configure shipments

Introduction

Try Example

In this example we will build an example using the shipments object.

  • 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.
  • 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 "locations": {
4 "id": 1,
5 "description": "Test Shipment",
6 "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"
7 },
8 "shipments": [
9 {
10 "pickup": {
11 "id": 1,
12 "location_index": 0,
13 "service": 120,
14 "time_windows": [
15 [
16 1661770800,
17 1661792400
18 ]

Result

docs-image


Have Questions ?