API Handling Extras

Filter Queries

The filter query parameter q can be used to filter results. It must be a JSON string of the following format:

For comparing with a String or numerical value
> q={'filters':[{'name': <fieldname>, 'op': <operatorname>, 'val': <argument>}],'option':optionvalue}

or

For comparing with a value from another field
> q={'filters':[{'name': <fieldname>, 'op': <operatorname>,'field': <fieldname>}],'option':optionvalue}

Operatornames

Possible operators for operatorname are:

  • ==, eq, equals, equals_to
  • !=, neq, does_not_equal, not_equal_to
  • >, gt, <, lt
  • >=, ge, gte, geq, <=, le, lte, leq
  • in, not_in
  • is_null, is_not_null
  • like
  • has
  • any

Optionvalues

Possible options for optionvalue are:

  • limit, offset, group_by, single
  • order_by

Possible parameters for order_by are a list of objects of the form;
{'field': <fieldname>, 'direction': <directionname>}

directionname is asc or desc

Reference

For a detailed description including examples, check the Flask query format

Delivery Stati

Status keyDescriptionStatus ID
noneThe delivery is either completely new and was never assigned to a tour or it was reset after cancelling a tour containing this delivery. Deliveries in status 'none' can used for new tour planning processes and can also be deleted if needed. But be aware that you should never delete deliveries while there is a tour planning in process which uses these deliveries!0
assignedThe delivery is assigned to a tour1
deliveredThe delivery was assigned to a tour and successfully delivered by the driver to the recipient. Additional codes can be used (see Delivery codes below)2
tooearlyThe delivery was assigned to a tour, the tour has already been started and ETA calculations noticed that this delivery's ETA is predicted to be earlier than the planned delivery time (PDT) if there won't be any further delay or a driver break.3
delayedThe delivery was assigned to a tour, the tour has already beenstarted and ETA calculations noticed that this delivery's ETA is predicted to be later than the planned delivery time (PDT) and thus, there is a delay which is relevant for the customer.4
cancelledThe delivery is marked as cancelled and will not be reused for tour plannings (again)5
problemThe 'problem' status can be used to indicate any kind of issues with this delivery. It has no technical implications on the tour itself6
repeatThe delivery is marked as 'to be repeated'. This status is not used in the standard routing process but can be used by API developers to indicate that this delivery should be deliverd again for some reason.7
undeliveredThe delivery was assigned to a tour and the driver tried to deliver it to the recipient but he/she was not successful (e.g. because the recipient was not at home). Additional codes can be used (see Delivery codes below)8
notreadyThe delivery is created but not ready for tour assignment. This can e.g. happen if the order data is already processed but the item to be delivered is not yet available in the depot. Deliveries in this status will not be used for tour planning9

Delivery Codes

Code IDLabel (EN/DE)
1'Delivery to the recipient' /
'Zustellung beim Empfänger'
2'Delivery to a neighbor' /
Zustellung beim Nachbarn
3'Delivery to a parcel shop' /
Zustellung im Paketshop
4'Recipient not available' /
'Empfänger nicht anwesend'
5'Acceptance refused' /
'Annahme verweigert'
6'Recipient could not be identified' /
'Empfänger nicht auffindbar'
7'Delivery to the recipient in a parcel shop' /
'Übergabe an Empfänger aus Paketshop'

Route Stati

noneTour was successfully calculated but neither assigned to a driver nor started yet0
driverassignedTour was successfully calculated and is assigned to a driver1
acceptedTour was successfully calculated, assigned to a driver and the driver has already accepted the tour (e.g. vie the "accept" button in the driver app)2
onthewayTour was successfully calculated, assigned to a driver, the driver has already accepted the tour and the drivers has given notice that he has started the tour (e.g. vie the "start tour" button in the driver app). As soon as the tour switches to the status "ontheway", ETA and tracking notifications are sent to the recipient if notification mails are set to active in the configuration3
cancelledThe route was already calculated, assigned or even started but was manually cancelled by the dispatcher for some reason4
problemThe 'problem' status can be used to indicate any kind of issues with this tour. It has no technical implications on the tour itself5
finishedAll deliveries in this tour were completed (either delivered or undelivered or deleted/cancelled)6
archivedThe tour was finished and archived manually afterwards7
replacedThe tour was calculated but later replaced by another instance of this exact tour (e.g. via re-calculation from another starting position or by updating it with new or deleted deliveries)8