Seiki API - v1 (1.2.0)

Download OpenAPI specification:Download

How to use this API

This API lets you analyse your POIs.

Authentication

To call this API you need an API key provided by Seiki. The API key is provided in every HTTP call in the key header.

Here is an example in Python :

requests.get(
    'https://api.smart4cast.seiki.co/v1/account/credits',
    headers = {'key': MY_API_KEY}
    )

In case of failed authentication, the API returns the following status codes :

  • 401 : No API key was provided
  • 403 : The provided API key is not authorized to access this API

Credits

To use this API, you need credits in order to anlyse POI : 1 POI = 1 credit

To retrieve your amount of credits, you can call the endpoint /account/credits

In case of insufficient credits, the API returns a status code 402.

For the endpoints that analyse POI, the optional boolean parameter dry_run can be provided, which allows you to check authentication and parameters validity at no cost. It also allows you to retrieve what would be the cost of the computation.

Basic example

The endpoint /poi lets you create a single new POI. This endpoint is synchronous, which means that your client will wait for the API to answer. You can either create a POI by its latitude / longitude, or by its address :

requests.post(
    'https://api.smart4cast.seiki.co/v1/poi',
    headers = { 'key': MY_API_KEY },
    json = { 'lat': 48.8751, 'lng': 2.3074 }
    ).json()
requests.post(
    'https://api.smart4cast.seiki.co/v1/poi',
    headers = { 'key': MY_API_KEY },
    json = { 'address': '178 bd Haussmann Paris' }
    ).json()

The output contains all information on the POI

Account

Get credits information

This route allows you to check your remaining credits

Authorizations:
None

Responses

Request samples

requests.get(
  'https://api.smart4cast.seiki.co/v1/account/credits',
  headers = { 'key': MY_API_KEY }
)

Response samples

Content type
application/json
{
  • "credits": 42
}

POI Analysis

Compute new POI

This route allows you to compute a single new POI, in a synchronous way. The POI can be described either by its coordinates (WGS84), or by an address : you cannot provide both. Beware that providing an address can result in an imprecision on the exact location.

The coordinates (48.8751, 2.3074) are free

Costs 1 credit

Authorizations:
None
Request Body schema: application/json
required
address
string

Full address

lat
number <float>

Latitude in WGS84 format

lng
number <float>

Longitude in WGS84 format

Responses

Request samples

Content type
application/json
{
  • "address": null,
  • "lat": 48.8751,
  • "lng": 2.3074
}

Response samples

Content type
application/json
{
  • "consumed_credits": 1,
  • "items": [
    ]
}