LE-KO Addresses API (v1.0.0)

Download OpenAPI specification:

LE-KO Address management and geocoding API for managing user addresses, geocoding, reverse geocoding, and location suggestions.

Addresses

Address management and geocoding

Get filtered addresses

✨ Gets addresses by filters. You must specify either userId or a combination of lat, lng, and distanceMeters to filter the addresses.

Authorizations:
bearerHttpAuthentication
query Parameters
userId
string <uuid> (Id) = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}...
Example: userId=4b72d209-debd-45e1-93cc-7640bf7d39bf

The user ID to filter addresses

lat
number <double>

Latitude for location-based filtering

lng
number <double>

Longitude for location-based filtering

distanceMeters
integer

Distance in meters for location-based filtering

header Parameters
traceparent
string^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-...
Example: 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01

W3C Trace Context traceparent header for request tracing

Responses

Response Schema: application/json
Array
id
required
string <uuid>
userId
required
string <uuid>
title
string
formattedAddress
required
string
addressType
string (AddressType)
Value: "Main"
latitude
number <double>
longitude
number <double>
entrance
string
floor
string
locationComment
string
city
string
street
string
subtitle
string
tags
Array of strings

Response samples

Content type
application/json
[
  • {
    • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    • "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
    • "title": "string",
    • "formattedAddress": "string",
    • "addressType": "Main",
    • "latitude": 0.1,
    • "longitude": 0.1,
    • "entrance": "string",
    • "floor": "string",
    • "locationComment": "string",
    • "city": "string",
    • "street": "string",
    • "subtitle": "string",
    • "tags": [
      • "string"
      ]
    }
]

Register a new address

✨ Register a new address. The formatted address should ideally match exactly the format returned by the geosuggest API. This ensures consistency and accuracy when storing and retrieving address information.

Authorizations:
bearerHttpAuthentication
header Parameters
traceparent
string^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-...
Example: 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01

W3C Trace Context traceparent header for request tracing

Request Body schema: application/json
required
userId
required
string <uuid>
title
string
formattedAddress
required
string
entrance
string
floor
string
locationComment
string
type
string (AddressType)
Value: "Main"
subtitle
string
tags
Array of strings

Responses

Response Schema: application/json
id
required
string <uuid>
userId
required
string <uuid>
title
string
formattedAddress
required
string
addressType
string (AddressType)
Value: "Main"
latitude
number <double>
longitude
number <double>
entrance
string
floor
string
locationComment
string
city
string
street
string
subtitle
string
tags
Array of strings

Request samples

Content type
application/json
{
  • "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
  • "title": "string",
  • "formattedAddress": "string",
  • "entrance": "string",
  • "floor": "string",
  • "locationComment": "string",
  • "type": "Main",
  • "subtitle": "string",
  • "tags": [
    • "string"
    ]
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
  • "title": "string",
  • "formattedAddress": "string",
  • "addressType": "Main",
  • "latitude": 0.1,
  • "longitude": 0.1,
  • "entrance": "string",
  • "floor": "string",
  • "locationComment": "string",
  • "city": "string",
  • "street": "string",
  • "subtitle": "string",
  • "tags": [
    • "string"
    ]
}

Get an address by ID

✨ Retrieve a specific address using its unique ID.

Authorizations:
bearerHttpAuthentication
path Parameters
addressId
required
string <uuid> (Id) = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}...
Example: 4b72d209-debd-45e1-93cc-7640bf7d39bf

The address ID

header Parameters
traceparent
string^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-...
Example: 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01

W3C Trace Context traceparent header for request tracing

Responses

Response Schema: application/json
id
required
string <uuid>
userId
required
string <uuid>
title
string
formattedAddress
required
string
addressType
string (AddressType)
Value: "Main"
latitude
number <double>
longitude
number <double>
entrance
string
floor
string
locationComment
string
city
string
street
string
subtitle
string
tags
Array of strings

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
  • "title": "string",
  • "formattedAddress": "string",
  • "addressType": "Main",
  • "latitude": 0.1,
  • "longitude": 0.1,
  • "entrance": "string",
  • "floor": "string",
  • "locationComment": "string",
  • "city": "string",
  • "street": "string",
  • "subtitle": "string",
  • "tags": [
    • "string"
    ]
}

Update an address

✨ Update an address by replacing all fields.

Authorizations:
bearerHttpAuthentication
path Parameters
addressId
required
string <uuid> (Id) = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}...
Example: 4b72d209-debd-45e1-93cc-7640bf7d39bf

The address ID

header Parameters
traceparent
string^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-...
Example: 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01

W3C Trace Context traceparent header for request tracing

Request Body schema: application/json
required
userId
required
string <uuid>
title
string
formattedAddress
required
string
entrance
string
floor
string
locationComment
string
type
string (AddressType)
Value: "Main"
subtitle
string
tags
Array of strings

Responses

Response Schema: application/json
id
required
string <uuid>
userId
required
string <uuid>
title
string
formattedAddress
required
string
addressType
string (AddressType)
Value: "Main"
latitude
number <double>
longitude
number <double>
entrance
string
floor
string
locationComment
string
city
string
street
string
subtitle
string
tags
Array of strings

Request samples

Content type
application/json
{
  • "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
  • "title": "string",
  • "formattedAddress": "string",
  • "entrance": "string",
  • "floor": "string",
  • "locationComment": "string",
  • "type": "Main",
  • "subtitle": "string",
  • "tags": [
    • "string"
    ]
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
  • "title": "string",
  • "formattedAddress": "string",
  • "addressType": "Main",
  • "latitude": 0.1,
  • "longitude": 0.1,
  • "entrance": "string",
  • "floor": "string",
  • "locationComment": "string",
  • "city": "string",
  • "street": "string",
  • "subtitle": "string",
  • "tags": [
    • "string"
    ]
}

Delete an address

✨ Delete an address by ID.

Authorizations:
bearerHttpAuthentication
path Parameters
addressId
required
string <uuid> (Id) = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}...
Example: 4b72d209-debd-45e1-93cc-7640bf7d39bf

The address ID

query Parameters
currentUserId
required
string <uuid>

The user of the ID attempting this operation

header Parameters
traceparent
string^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-...
Example: 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01

W3C Trace Context traceparent header for request tracing

Responses

Response samples

Content type
application/json
{
  • "errors": [
    • {
      • "code": "validation",
      • "message": "string",
      • "endpoint": "string",
      • "requestId": "string"
      }
    ]
}

Set the type of an address

✨ Sets the type of an address and unsets any other addresses of said type for the same user

Authorizations:
bearerHttpAuthentication
path Parameters
addressId
required
string <uuid>

The address ID

header Parameters
traceparent
string^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-...
Example: 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01

W3C Trace Context traceparent header for request tracing

Request Body schema: application/json
required
currentUserId
required
string <uuid>
addressType
required
string (AddressType)
Value: "Main"

Responses

Response Schema: application/json
id
required
string <uuid>
userId
required
string <uuid>
title
string
formattedAddress
required
string
addressType
string (AddressType)
Value: "Main"
latitude
number <double>
longitude
number <double>
entrance
string
floor
string
locationComment
string
city
string
street
string
subtitle
string
tags
Array of strings

Request samples

Content type
application/json
{
  • "currentUserId": "4750c4be-4caf-4d36-8460-9ae0cc06fb88",
  • "addressType": "Main"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
  • "title": "string",
  • "formattedAddress": "string",
  • "addressType": "Main",
  • "latitude": 0.1,
  • "longitude": 0.1,
  • "entrance": "string",
  • "floor": "string",
  • "locationComment": "string",
  • "city": "string",
  • "street": "string",
  • "subtitle": "string",
  • "tags": [
    • "string"
    ]
}

Geocode addresses

✨ Geocoding is the process of converting addresses into geographic coordinates. This endpoint suggests addresses based on a query string and returns their corresponding geographic coordinates.

Authorizations:
bearerHttpAuthentication
query Parameters
query
required
string non-empty

The query string to suggest addresses

header Parameters
traceparent
string^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-...
Example: 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01

W3C Trace Context traceparent header for request tracing

Responses

Response Schema: application/json
Array
formattedAddress
required
string
latitude
required
number <double>
longitude
required
number <double>
street
required
string or null
region
required
string or null
city
required
string or null

Response samples

Content type
application/json
[
  • {
    • "formattedAddress": "string",
    • "latitude": 0.1,
    • "longitude": 0.1,
    • "street": "string",
    • "region": "string",
    • "city": "string"
    }
]

Reverse geocode.

✨ Reverse geocoding is the process of converting geographic coordinates into human-readable addresses. This endpoint returns suggested addresses based on the provided geographic coordinates in the query string.

Authorizations:
bearerHttpAuthentication
query Parameters
latitude
required
number <double> [ -90 .. 90 ]

Latitude to reverse geocode.

longitude
required
number <double> [ -180 .. 180 ]

longitude to reverse geocode.

header Parameters
traceparent
string^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-...
Example: 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01

W3C Trace Context traceparent header for request tracing

Responses

Response Schema: application/json
formattedAddress
required
string
latitude
required
number <double>
longitude
required
number <double>
street
required
string or null
region
required
string or null
city
required
string or null

Response samples

Content type
application/json
{
  • "formattedAddress": "string",
  • "latitude": 0.1,
  • "longitude": 0.1,
  • "street": "string",
  • "region": "string",
  • "city": "string"
}

Suggest addresses

✨ Suggest addresses based on a query string.

Authorizations:
bearerHttpAuthentication
query Parameters
query
required
string

The query string to suggest addresses

baseLat
number <float> [ -90 .. 90 ]

Optional base latitude for location-based suggestions

baseLong
number <float> [ -180 .. 180 ]

Optional base longitude for location-based suggestions

header Parameters
traceparent
string^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-...
Example: 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01

W3C Trace Context traceparent header for request tracing

Responses

Response Schema: application/json
Array
title
required
string
formattedAddress
required
string
street
required
string or null
region
required
string or null
city
required
string or null
tags
Array of strings or null
subtitle
string or null

Response samples

Content type
application/json
[
  • {
    • "title": "string",
    • "formattedAddress": "string",
    • "street": "string",
    • "region": "string",
    • "city": "string",
    • "tags": [
      • "string"
      ],
    • "subtitle": "string"
    }
]

Get nearby users based on addresses

✨ Retrieves user IDs of nearby users based on a provided latitude and longitude. This endpoint returns a list of user IDs for users located within a certain radius of the given coordinates.

Authorizations:
bearerHttpAuthentication
query Parameters
userId
required
string <uuid>

The ID of the user which is requesting other nearby users. This is used to filter them out of the results.

latitude
required
number <double>
longitude
required
number <double>
maxDistanceInMeters
required
integer >= 1
header Parameters
traceparent
string^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-...
Example: 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01

W3C Trace Context traceparent header for request tracing

Responses

Response Schema: application/json
Array
string <uuid>

Response samples

Content type
application/json
[
  • "497f6eca-6276-4993-bfeb-53cbbbba6f08"
]