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
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

Bad Request

object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
}
}

Unauthorized

Media type */*
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties

Forbidden

Media type */*
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties

Internal Server Error

object
Example generated
{}