Articles on: Integrations

How to read closed-route data through the API

You might need to know when a route is closed and which sales were carried out in that route. Here, we'll explain how to do this:


Step 1. Get the routes


Make a GET request to this endpoint using these parameters:


https://app.handy.la/api/v2/route?includeSalesOrders=true&filterWithDate=dateClosed&start={start}&end={end}


With this request, you'll receive the closed routes within the dates you specify.


As an answer, you'll get a JSON with all of the route's information, as well as a field with the route sales IDs, which will look like this:


{    "pagination": { ... },    "routes": [        {            "id": 379,            "salesOrderIds": [1, 42, 69],            ....        }    ]}


Step 2. Get information on each sale


Make a GET request to this endpoint for each sale ID.


https://app.handy.la/api/v2/salesOrder/{id}


As an answer, you'll get a JSON with all the sales details.


You can manage this information as you prefer. Save it in your database, create a report, sum all totals, etc.


Recommendations


💡 Don't forget to take a look at all of the API's documents for more information.


💡 You can take these as examples. They were performed in JavaScript in the routes.js script with these code examples:


https://github.com/arturo-ojeda/handy-api-examples


Send us a message in the chat if you have any questions!

Updated on: 04/02/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!