Introduction to Dispatch API
The Dispatch API takes care of all of your routing, dispatch, and optimization needs, allowing you to focus on the other parts of your business. The API supports a wide range of use cases from ridehail to delivery services, is base-map agnostic, and is compatible with both human-driven and autonomous vehicles.
Let's first look at some important terms used frequently throughout this guide.
Tasks refer to actions that are completed by the Dispatch API. In terms of ridehail, it can refer to trips from one location to another while for delivery services, it can refer to packages that need to be taken from point A to point B. You can find more information about tasks here.
A resource represents any entity that can be picked up or dropped off. In terms of ridehail, it can refer to passengers and for delivery it can refer to things like packages, boxes and food parcels. You can find more information about resources here.
Capacities refer to the type and number of resources a vehicle can carry. For example, seats, number of boxes, weight etc. Refer to the guide on capacities for more information.
The Dispatch API can be further divided into:
- Fleet API: create, query, update, and delete fleets.
- Vehicle API: create, query, update, and delete vehicles.
- Task API: create, query, and update tasks.
- Resource API: create and query generic resources.
- Vehicle State API: query and update a vehicle's state, i.e. whether it is accepting rides or not as well as get all the tasks assigned to a vehicle.
- Vehicle Position API: query and update vehicle positions.
- Vehicle ETA API: query ETAs of vehicles in a fleet. This service can be used for live ETAs for active tasks as well as estimates for potential tasks.
Here is a flowchart of the basic steps you need to complete in order to build a delivery or ridehail service using the Dispatch API.
Once you have the API Key, you can set the environment variable with
export RIDEOS_API_KEY="YOUR_API_KEY" and use
RIDEOS_API_KEY in all the cURL commands given in the documentation.
Here are some guides to get you started with the Dispatch API: