Quick start

  1. Go to the Mappable Account and register a new account or log in to an existing. The main page will display a key that is suitable for any Mappable service.

    Note

    The async matrix generation is currently available only upon request.

    If you need it, send us an email at sales@mappable.world.

  2. Send request to initiate the matrix generation operation.

    curl -X POST 'https://distancematrix.api.mappable.world/v2/async//driving/matrices/generate?apikey=YOUR_API_KEY' \
        -H 'Content-Type: application/json' \
        --data '{"origins":[[37.540775,55.886412],[37.509132,55.825264],[37.484335,55.826820],[37.722153,55.721870],[37.468273,55.676837]],"destinations":[[37.619979,55.676799],[37.646084,55.826680],[37.661889,55.671596],[37.640079,55.780732],[37.494420,55.762688],[37.656392,55.874199]]}'
    
  3. Send request to get the status of the async operation. Use the ID obtained from the response of the previous request.

    curl 'https://distancematrix.api.mappable.world/v2/async//driving/operations/get?apikey=YOUR_API_KEY&id=OPERATION_ID'
    
  4. When the async operation has finished. Send the request to get the resulting matrix. Use the matrix ID obtained from the response of the previous request. Note that the response is gzip-encoded.

    curl 'https://distancematrix.api.mappable.world/v2/async//driving/matrices/get?apikey=YOUR_API_KEY&id=MATRIX_ID' | gunzip