Webportal v2

embedded apps

API Reference - navigation.destinationAddress

Required Privacy: Always available
Plateforme Compatibility:
Operations:

This API allows to destination adress of the current navigation.

Input Parameter
No input params
Output Data
Data name Description Type Unit/Values Example
number

Destintion adress street number.

string

n/a

16
street

Destintion adress street name.

string

n/a

5th avenue
crossingStreet

Destintion adress crossing street name.

string

n/a

Roosvelt Road
cityBlock

Destintion adress city block number.

string

n/a

42
cityDistrict

Destintion adress city district name.

string

n/a

Manhattan
cityName

Destintion adress city name.

string

n/a

New York
postalCode

Destintion adress postal code.

string

n/a

10001
extendedPostalCode

Destintion adress extended postal code.

string

n/a

10001
stateCode

Destintion adress stateCode.

string

n/a

US-NY
stateName

Destintion adress state name.

string

n/a

New York
countryCode

Destintion adress country code.

string

ISO 3166-1 alpha-3

USA
countryName

Destintion adress country name.

string

n/a

United State of America
formattedAddress

Destintion adress formattedAddress. This field is optional

string

n/a

111 5th Avenue, New York, NY
Code Example
1
2
3
4
5
6
7
8
9
10
11
12
13
webportal.get(
    /* api name */
    "navigation.destinationAddress",
    /* parameters */
     null
  )
  /* callback for `REPLY` messages */
  .then((message) => {
    if (message.status === 200) {
      /* handle `REPLY` success */
    }
    else { /* handle `REPLY` error */ }
  })
1
2
3
4
5
6
{
  "id": "7372c16f-5f2f-42c9-84a7-5490e35f1be0", 
  "type": "GET", 
  "api": "navigation.destinationAddress",
  "params":  null
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// --- format of the `REPLY` message ---

{
  "id": "7372c16f-5f2f-42c9-84a7-5490e35f1be0",
  "type": "REPLY",
  "api": "navigation.destinationAddress",
  "status": 200,
  "statusText": "OK", 
  "data":  { 
    "number": "16",
    "street": "5th avenue",
    "crossingStreet": "Roosvelt Road",
    "cityBlock": "42",
    "cityDistrict": "Manhattan",
    "cityName": "New York",
    "postalCode": "10001",
    "extendedPostalCode": "10001",
    "stateCode": "US-NY",
    "stateName": "New York",
    "countryCode": "USA",
    "countryName": "United State of America",
    "formattedAddress": "111 5th Avenue, New York, NY"
  } 
}

false

This API allows to destination adress of the current navigation.

Input Parameter
No input params
Output Data
Data name Description Type Unit/Values Example
number

Destintion adress street number.

string

n/a

16
street

Destintion adress street name.

string

n/a

5th avenue
crossingStreet

Destintion adress crossing street name.

string

n/a

Roosvelt Road
cityBlock

Destintion adress city block number.

string

n/a

42
cityDistrict

Destintion adress city district name.

string

n/a

Manhattan
cityName

Destintion adress city name.

string

n/a

New York
postalCode

Destintion adress postal code.

string

n/a

10001
extendedPostalCode

Destintion adress extended postal code.

string

n/a

10001
stateCode

Destintion adress stateCode.

string

n/a

US-NY
stateName

Destintion adress state name.

string

n/a

New York
countryCode

Destintion adress country code.

string

ISO 3166-1 alpha-3

USA
countryName

Destintion adress country name.

string

n/a

United State of America
formattedAddress

Destintion adress formattedAddress. This field is optional

string

n/a

111 5th Avenue, New York, NY
Code Example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
webportal.subscribe(
    /* api name */
    "navigation.destinationAddress",
    /* parameters */
     null,
    /* callback for `NOTIFY` messages */
    async (notifyMessage) => {
      if (notifyMessage.status === 200) {
        /* handle `NOTIFY` response */
      }
      else { /*  handle `NOTIFY` error  */ }
    }
  )
  /* callback for `REPLY` messages */
  .then((message) => {
    if (message.status === 200) {
      /* handle `REPLY` success */
    }
    else { /* handle `REPLY` error */ }
  })
1
2
3
4
5
6
{
  "id": "7372c16f-5f2f-42c9-84a7-5490e35f1be0", 
  "type": "SUBSCRIBE", 
  "api": "navigation.destinationAddress",
  "params":  null
}
1
2
3
4
5
6
7
8
9
10
11
// --- format of the `REPLY` message ---
// type: acknowledge the status of the subscription
// reception: only once after the subscription request
// contains outputed data: no
{
  "id": "7372c16f-5f2f-42c9-84a7-5490e35f1be0",
  "type": "REPLY",
  "status": 200,
  "statusText": "OK"
}

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// --- format of the `NOTIFY` message ---
// type: event message about the subscription
// reception: each time the conditions of the subscription are met
// contains outputed data: yes
{
  "id": "7372c16f-5f2f-42c9-84a7-5490e35f1be0",
  "type": "NOTIFY",
  "api": "navigation.destinationAddress",
  "status": 200,
  "statusText": "OK", 
  "data":  { 
    "number": "16",
    "street": "5th avenue",
    "crossingStreet": "Roosvelt Road",
    "cityBlock": "42",
    "cityDistrict": "Manhattan",
    "cityName": "New York",
    "postalCode": "10001",
    "extendedPostalCode": "10001",
    "stateCode": "US-NY",
    "stateName": "New York",
    "countryCode": "USA",
    "countryName": "United State of America",
    "formattedAddress": "111 5th Avenue, New York, NY"
  } 
}