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

Authorization

Limosys Geo Key

Request parameters

Parameter Description

lat

Geometry Latitude

lon

Geometry Longitude

address

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

Array

Matrix results

matrix[].timeSeconds

Number

Time in seconds REQUIRED

matrix[].dist_meters

Number

Distance in meters REQUIRED

matrix[].location1

class java.lang.String

Origin - REQUIRED if coordinate not provided

matrix[].location2

class java.lang.String

Destination - REQUIRED if coordinate not provided

matrix[].lat1

Number

Origin Latitude coordinate used (if available)

matrix[].lon1

Number

Origin Longitude coordinate used (if available)

matrix[].lat2

Number

Destination Latitude coordinate used (if available)

matrix[].lon2

Number

Destination Longitude coordinate used (if available)

traffic

Boolean

Used traffic - boolean

oneYearHack

Boolean

Used oneYearHack param - boolean

highways

Boolean

Use 'false' if avoid highways was used, default is 'true'

trafficModel

class java.lang.String

Traffic model used - 'optimistic', 'pessimistic', 'best_guess'

Response body