Directions API V2 returns HTTP 400 Bad Request

Hello HeiGIT Support Team,

I am using the HeiGIT Directions API V2 for route generation in SI-LANGKAR, a school bus tracking application in Indonesia.

My HeiGIT account dashboard shows that the Directions V2 quota is available (2000/2000).

However, requests to the following endpoint return HTTP 400 Bad Request:

https://api.heigit.org/openrouteservice/v2/directions/driving-car/geojson

I tested the API using a Python script with a simple request and also tested using a mobile hotspot instead of my regular internet connection. The error persists.

The Python script displays:

HTTP 400
400 Bad Request

Could you please help investigate why the Directions API returns this response?

I can provide additional request details if needed.

Thank you for your assistance.

Hey,

could you please provide the full request you are submitting, ideally in cURL-Format? Please remember to redact your API key.

Best regards

I’d check the request payload before spending more time testing different networks. A 400 usually points to something the API doesn’t accept in the request, rather than a quota problem.

One thing worth checking is the coordinates format. For the GeoJSON directions endpoint, the body should contain a coordinates array with longitude first, then latitude. It’s an easy mistake to make when the coordinates come from a GPS or mapping library that uses latitude/longitude order.

Also, does your Python script print the actual response body, or just the HTTP status? That might tell you a lot more about what’s being rejected.

Sharing the redacted cURL request as suggested above would probably narrow this down pretty quickly.