1. Cache Geocode Result
Curl request
$ curl 'https://utils.limosys.net/geocache/geocoder?address=VALID+ADDRESS&lat=25.5&lon=-25.5' -i -X GET \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Authorization: YOUR_GEO_API_KEY' \
-H 'Accept: application/json'
HTTP request
GET /geocache/geocoder?address=VALID+ADDRESS&lat=25.5&lon=-25.5 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: YOUR_GEO_API_KEY
Accept: application/json
Host: utils.limosys.net
HTTP response
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: POST, GET, PUT, OPTIONS, DELETE
Access-Control-Max-Age: 3600
Access-Control-Allow-Headers: origin, content-type, accept, authorization
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: Set-Cookie
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
HTTPie request
$ http GET 'https://utils.limosys.net/geocache/geocoder?address=VALID+ADDRESS&lat=25.5&lon=-25.5' \
'Content-Type:application/json;charset=UTF-8' \
'Authorization:YOUR_GEO_API_KEY' \
'Accept:application/json'
Request body
Request headers
Name | Description |
---|---|
|
Limosys Geo Key |
Request parameters
Parameter | Description |
---|---|
|
Geometry Latitude |
|
Geometry Longitude |
|
Geocoded Address String |
Response body
2. Cache Matrix Result
Curl request
$ curl 'https://utils.limosys.net/geocache/matrix' -i -X PUT \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Authorization: YOUR_GEO_API_KEY' \
-H 'Accept: application/json' \
-d '{"matrix":[{"dist_meters":5000,"dist":3.1068559611866697,"time":5,"timeSeconds":300,"lat1":25.5,"lon1":-25.5,"lat2":25.5,"lon2":-25.5}],"traffic":false,"highways":false,"trafficModel":"OPTIMISTIC"}'
HTTP request
PUT /geocache/matrix HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: YOUR_GEO_API_KEY
Accept: application/json
Content-Length: 197
Host: utils.limosys.net
{"matrix":[{"dist_meters":5000,"dist":3.1068559611866697,"time":5,"timeSeconds":300,"lat1":25.5,"lon1":-25.5,"lat2":25.5,"lon2":-25.5}],"traffic":false,"highways":false,"trafficModel":"OPTIMISTIC"}
HTTP response
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: POST, GET, PUT, OPTIONS, DELETE
Access-Control-Max-Age: 3600
Access-Control-Allow-Headers: origin, content-type, accept, authorization
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: Set-Cookie
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
HTTPie request
$ echo '{"matrix":[{"dist_meters":5000,"dist":3.1068559611866697,"time":5,"timeSeconds":300,"lat1":25.5,"lon1":-25.5,"lat2":25.5,"lon2":-25.5}],"traffic":false,"highways":false,"trafficModel":"OPTIMISTIC"}' | http PUT 'https://utils.limosys.net/geocache/matrix' \
'Content-Type:application/json;charset=UTF-8' \
'Authorization:YOUR_GEO_API_KEY' \
'Accept:application/json'
Request body
{"matrix":[{"dist_meters":5000,"dist":3.1068559611866697,"time":5,"timeSeconds":300,"lat1":25.5,"lon1":-25.5,"lat2":25.5,"lon2":-25.5}],"traffic":false,"highways":false,"trafficModel":"OPTIMISTIC"}
Request fields
Path | Type | Description |
---|---|---|
|
|
Matrix results |
|
|
Time in seconds REQUIRED |
|
|
Distance in meters REQUIRED |
|
|
Origin - REQUIRED if coordinate not provided |
|
|
Destination - REQUIRED if coordinate not provided |
|
|
Origin Latitude coordinate used (if available) |
|
|
Origin Longitude coordinate used (if available) |
|
|
Destination Latitude coordinate used (if available) |
|
|
Destination Longitude coordinate used (if available) |
|
|
Used traffic - boolean |
|
|
Used oneYearHack param - boolean |
|
|
Use 'false' if avoid highways was used, default is 'true' |
|
|
Traffic model used - 'optimistic', 'pessimistic', 'best_guess' |
Response body