Adding the addresses of fixed locations for loading and unloading

Adding places to your fre­quent­ly used list. Users can use the list of places they often use. Saved loca­tions can be changed and used for load­ing or unload­ing. The num­ber of saved address­es is unlim­it­ed.

Url parameters and connection settings

  • URL: https://api.platform.trans.eu
  • End­point: /ex­t/­sug­ges­tions-api/v1/­sug­ges­tion­s/spots
  • Method: POST

Headers:

  • Con­tent-type: application/json
  • Accept: application/json
  • Autho­riza­tion: Bear­er {access_token}
  • Api-key: {unique_app_api_key}

Authorization

Autho­riza­tion process is described here. Each API request must also con­sist of unique Api-key obtained dur­ing appli­ca­tion reg­is­tra­tion togeth­er with client_id and client_secret.

Structure of posting new suggestions

JsonExam­pleTypeIs requiredDescrip­tion
name“test1”stringNoLocal­i­ty name
street“Koperni­ka”stringYesStreet
num­ber“9a”stringYesnum­ber of street
local­i­ty“Jor­danów Śląs­ki”stringYesLocal­i­ty (e.g. city name)
postal_code“55–065”stringYespostal_code
coun­try“PL”stringYesCode of coun­try
details“Addi­tion­al infor­ma­tion”stringNoAddi­tion­al infor­ma­tion

Request body

Sam­ple of request for get­ting list of saved loca­tion.

{
  "name": "test",
  "street": "Kopernika",
  "number": "9",
  "locality": "Jordanów Śląski",
  "postal_code": "55-065",
  "country": "PL",
  "details": "test test"
}

Responses

  • Code: 200 — Suc­cess
[
  {
    "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 pay­load