Skip to content

Get caller's location from IP

GET
/api/location
curl --request GET \
--url https://api.wink.travel/api/location \
--header 'Authorization: Bearer <token>' \
--header 'Wink-Version: 2.0'

Resolve the approximate geographic location and timezone of the API caller based on their IP address.

Wink-Version
string
default: 2.0.0
Allowed values: 2.0

Caller’s location resolved successfully

Media type application/json

Geo-location details resolved from an IP address

object
cityName

City name

string
""
cityGeoNameId

City GeoNames identifier

integer format: int64
""
countryName

Country name

string
""
countryCode

Country ISO 3166-1 alpha-2 code

string
""
countryGeoNameId

Country GeoNames identifier

integer format: int64
""
continentName

Continent name

string
""
continentCode

Continent code

string
""
continentGeoNameId

Continent GeoNames identifier

integer format: int64
""
timezone

IANA time zone identifier

string
""
longitude

Longitude coordinate

number format: double
""
latitude

Latitude coordinate

number format: double
""
key
additional properties
""
Example
{
"cityName": "Bangkok",
"cityGeoNameId": 1609350,
"countryName": "Thailand",
"countryCode": "TH",
"countryGeoNameId": 1605651,
"continentName": "Asia",
"continentCode": "AS",
"continentGeoNameId": 6255147,
"timezone": "Asia/Bangkok",
"longitude": 100.5581533,
"latitude": 13.7370197
}

Bad Request — missing or invalid request parameter or body

Media type application/problem+json
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties
key
additional properties
""
Example

Unauthorized — authentication is required or the session has expired

Media type application/problem+json
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties
key
additional properties
""
Example

Forbidden — authenticated but lacking the required permission or scope

Media type application/problem+json
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties
key
additional properties
""
Example

Not Found — the requested resource does not exist

Media type application/problem+json
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties
key
additional properties
""
Example

Method Not Allowed — the HTTP verb is not supported on this endpoint

Media type application/problem+json
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties
key
additional properties
""
Example

Unsupported Media Type — use application/json

Media type application/problem+json
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties
key
additional properties
""
Example

Internal Server Error — an unexpected failure occurred on the server

Media type application/problem+json
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties
key
additional properties
""
Example

Service Unavailable — a downstream dependency is unreachable

Media type application/problem+json
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties
key
additional properties
""
Example