.. Tarot Routing Optimisation API documentation master file, created by sphinx-quickstart on Sat Jul 17 00:24:52 2021. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. Simpler Route Optimisation ========================================================== *Tarot Routing - Route Optimisation API* .. toctree:: :hidden: :maxdepth: 2 Quickstart concepts constraints reference endpoints version_index Access the Tarot Routing Platform Quickstart ---------- 1. Auth ^^^^^^^ If you don't have an account already, `Sign Up `_ for one or reach out to us at info@tarotanalytics.com Then, get your :ref:`Access Token `: .. tabs:: .. tab:: bash .. literalinclude:: _static/auth_req.sh :language: bash .. tab:: python .. literalinclude:: _static/auth_req.py :language: python :ref:`Learn More... ` 2. Request Body ^^^^^^^^^^^^^^^ Second, let's prepare a JSON request body made up of :py:data:`Jobs `, :py:data:`Drivers ` and :py:data:`Settings` representing your routing problem: .. literalinclude:: _static/ex1.json :language: json :caption: Request Body `ex1.json` .. code-block:: bash :caption: Here's one I prepared earlier wget https://docs.opt.route.optimiser.app/_static/ex1.json :ref:`Learn More... ` 3. Optimise ^^^^^^^^^^^ You can access the Route Optimisation API by sending a ``POST`` request to the :ref:`Synchronous Route Optimisation API` endpoint. .. tabs:: .. tab:: bash .. literalinclude:: _static/optimise_req.sh :language: bash .. tab:: python .. literalinclude:: _static/optimise_req.py :language: python :ref:`Learn More... ` 4. Response ^^^^^^^^^^^ A few seconds later, you'll receive a response: .. literalinclude:: _static/resp1.json :language: json :caption: Response Body The ``runs`` element is a list of Runs. The first Object in each Run is the Driver. All Subsequent objects in that Run are the Jobs. Any Jobs listed in ``unserved_jobs`` were not able to be served with the Drivers provided. :ref:`Learn More... ` Next Steps ^^^^^^^^^^ Route Optimisation is complex, but we try to make it as easy as possible to just get to the parts you need! #. Have a quick read of :ref:`Route Optimisation Concepts ` to get familiar with terminology. #. Learn :ref:`How to Express Constraints ` to the Route Optimisation API . .. Indices and tables .. ================== .. * :ref:`genindex` .. * :ref:`modindex` .. * :ref:`search`