Basic Distance Matrix Fast - POST Request

Implement Using: Distance Matrix Fast API


Let’s see how to build a Distance Matrix POST method request for the same scenario from curbside example

Request

1
curl --location --request POST 'https://api.nextbillion.io/distancematrix/json?key=<your_api_key>' \
2
--header 'Content-Type: application/json' \
3
--data-raw '{
4
"origins":"34.05456317,-118.31528428|33.99167000,-118.25687955|34.00792776,-118.33063151",
5
"destinations":"33.96763110,-118.23215346|33.93969502,-118.26583210|33.90184293,-118.19634326",
6
"mode":"truck",
7
"approaches":"curb;curb;curb"
8
}'

Response

1
{
2
"status": "Ok",
3
"rows": "[...]"
4
}

© 2024 NextBillion.ai all rights reserved.