v1

latestOpenAPI 3.0.0Proprietary2026-08-06130577659.7 KB
Disposition|Tour

Assign an order to a tour.

This endpoint allows an order to be associated with a tour. The system will attempt to find a stop at the address of the order. If no existing stop is found, a new stop is added to the tour.

When a new stop is added to the tour, it must be recalculated or optimzed if desired. The status of the tour will be reset to NEW. This is because the distances, durations, and departure and arrival times of the jobs may change when a new job is added, and the values need to be calculated for the new stop as well. You must do that at the /tour/calculate endpoint.

get/tour/assign_order

Query parameters

orderIdinteger

The internal id of the order to be added to the tour.

orderExternalReferencestring

The external reference for the order to be added to the tour (Used if orderId not provided).

tourIdinteger required

The internal id of the tour to be updated. This parameter is required.

beforeStopIdinteger

The id of the stop before which to insert the new order.

afterStopIdinteger

The id of the stop after which to insert the new order.

Response

Success Response:

Example response

{
  "data": {
    "startDate": "2015-02-20",
    "stops": [
      {
        "latLng": [
          52.38127828631681,
          7.594243214018696
        ],
        "eta": "2015-02-20T12:59:21+01:00",
        "etd": "2015-02-20T12:59:21+01:00",
        "ata": "2015-02-20T12:59:21+01:00",
        "atd": "2015-02-20T12:59:21+01:00",
        "orders": [
          {
            "createdAt": "2015-02-20T12:59:21+01:00"
          }
        ]
      }
    ],
    "startTime": "2015-02-20T12:59:21+01:00",
    "endTime": "2015-02-20T12:59:21+01:00"
  },
  "newStop": {
    "latLng": [
      52.38127828631681,
      7.594243214018696
    ],
    "eta": "2015-02-20T12:59:21+01:00",
    "etd": "2015-02-20T12:59:21+01:00",
    "ata": "2015-02-20T12:59:21+01:00",
    "atd": "2015-02-20T12:59:21+01:00",
    "orders": [
      {
        "createdAt": "2015-02-20T12:59:21+01:00"
      }
    ]
  }
}