Adding places to your frequently used list. Users can use the list of places they often use. Saved locations can be changed and used for loading or unloading. The number of saved addresses is unlimited.
Url parameters and connection settings
- URL: https://api.platform.trans.eu
- Endpoint: /ext/suggestions-api/v1/suggestions/spots
- Method: POST
Headers:
- Content-type: application/json
- Accept: application/json
- Authorization: Bearer {access_token}
- Api-key: {unique_app_api_key}
Authorization
Authorization process is described here. Each API request must also consist of unique Api-key obtained during application registration together with client_id and client_secret.
Structure of posting new suggestions
Json | Example | Type | Is required | Description |
name | “test1” | string | No | Locality name |
street | “Kopernika” | string | Yes | Street |
number | “9a” | string | Yes | number of street |
locality | “Jordanów Śląski” | string | Yes | Locality (e.g. city name) |
postal_code | “55–065” | string | Yes | postal_code |
country | “PL” | string | Yes | Code of country |
details | “Additional information” | string | No | Additional information |
Request body
Sample of request for getting list of saved location.
{
"name": "test",
"street": "Kopernika",
"number": "9",
"locality": "Jordanów Śląski",
"postal_code": "55-065",
"country": "PL",
"details": "test test"
}
Responses
- Code: 200 — Success
[
{
"account_id": 10116324,
"company_id": 1038173,
"counter": 45,
"data": {
"country": "NL",
"latitude": 52.37403,
"locality": "Amsterdam",
"longitude": 4.8936041,
"name": "Nazwa firmy, lokalizacja 1",
"number": "12",
"postalCode": "1012",
"street": "Ulica",
"details": "some details"
},
"id": "af44e8d9-9604-48b0-af40-21663431663f"
}
]
- Code: 422 — Invalid payload