Skip to content
TarekyDocs
Console

Public API: places of one category along a route, with detour times (metered)

POST
/v1/poi/along-route
curl --request POST \
--url https://api.tareky.com/v1/poi/along-route \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "route": "example", "routeFormat": "polyline", "categoryId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "buffer": 300, "from": { "lng": 1, "lat": 1 }, "maxAheadMeters": 1, "take": 10, "detour": true, "sortBy": "along" }'
x-access-key-id
string

Legacy key id (until its sunset)

Media typeapplication/json
object
route
required

The route as an encoded polyline, 2 to 10,000 points, which must enter Iraq

string
>= 1 characters
routeFormat

Precision of route: polyline is Google precision 5 (what /directions returns), polyline6 precision 6

string
default: polyline
Allowed values: polyline polyline6
categoryId
required

Required: one category keeps the corridor query to milliseconds

string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
buffer

Metres either side of the route

number
default: 300 >= 50 <= 2000
from

Where the driver is: places behind it are left out, and aheadMeters counts from it

object
lng
required
number
>= -180 <= 180
lat
required
number
>= -90 <= 90
maxAheadMeters

Only places within this many metres of from along the route (default: the rest of it)

number
>= 100 <= 1000000
take
integer
default: 10 >= 1 <= 20
detour

Price each place as a detour from the route; false skips the routing engine

boolean
default: true
sortBy

detour ranks the first 20 places ahead by detour time (the same as along when detour is false)

string
default: along
Allowed values: along detour
Media typeapplication/json
object
routeLengthMeters
required

Length of the whole route that was sent

integer
>= -9007199254740991 <= 9007199254740991
fromAlongMeters
required

Where from sits along the route, in metres from its start; null when no from was sent

integer
nullable >= -9007199254740991 <= 9007199254740991
data
required
Array<object>
object
id
required
string
lng
required
number
lat
required
number
categoryId
required
string | null
name
required
object
ar
required
string | null
en
required
string | null
ckb
required
string | null
category
required
object
id
required
string
name
required
object
ar
required
string | null
en
required
string | null
ckb
required
string | null
avgRating
required

Mean review rating, 0 when there are no reviews

number
reviewCount
required
integer
>= -9007199254740991 <= 9007199254740991
alongMeters
required

Metres from the start of the route to the place

integer
>= -9007199254740991 <= 9007199254740991
aheadMeters
required

Metres from from (or the start of the route) to the place, along the route

integer
>= -9007199254740991 <= 9007199254740991
offRouteMeters
required

Distance from the route line to the place

integer
>= -9007199254740991 <= 9007199254740991
detourSeconds
required

Extra driving time to visit the place and rejoin the route; null when it could not be priced

integer
nullable >= -9007199254740991 <= 9007199254740991
detourMeters
required

Extra driving distance, same rule

integer
nullable >= -9007199254740991 <= 9007199254740991
Examplegenerated
{
"routeLengthMeters": 1,
"fromAlongMeters": 1,
"data": [
{
"id": "example",
"lng": 1,
"lat": 1,
"categoryId": "example",
"name": {
"ar": "example",
"en": "example",
"ckb": "example"
},
"category": {
"id": "example",
"name": {
"ar": "example",
"en": "example",
"ckb": "example"
}
},
"avgRating": 1,
"reviewCount": 1,
"alongMeters": 1,
"aheadMeters": 1,
"offRouteMeters": 1,
"detourSeconds": 1,
"detourMeters": 1
}
]
}

Rate limit or monthly quota exceeded; see Retry-After

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable code, e.g. quota_exceeded, no_route

string
message
required
string
status
required
integer
>= -9007199254740991 <= 9007199254740991
details

For invalid_request: the validation issues

docsUrl
required
string
requestId
string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"status": 1,
"details": "example",
"docsUrl": "example"
},
"requestId": "example"
}

Any other error, in the /v1 error envelope

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable code, e.g. quota_exceeded, no_route

string
message
required
string
status
required
integer
>= -9007199254740991 <= 9007199254740991
details

For invalid_request: the validation issues

docsUrl
required
string
requestId
string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"status": 1,
"details": "example",
"docsUrl": "example"
},
"requestId": "example"
}