POST v2/settings

Saves a setting configuration for push notifications

Request Information

URI Parameters

None.

Body Parameters

Object of type SettingDto with all settings

SettingDto
NameDescriptionTypeAdditional information
DeviceId

ID of the device

string

None.

DeviceType

Type of device

string

None.

Language

Two letter Iso language for the notification Possible options are: "de, it, en, rm" (rm for ladin language)

string

None.

PushEnabled

true if push notification should be activated

boolean

None.

Municipalities

ISTAT code of italian municipalities enabled for the notification of weather alerts (021XXX -> Alto Adige Südtirol only)

Collection of string

None.

Request Formats

application/json, text/json

Sample:
{
  "deviceId": "sample string 1",
  "deviceType": "sample string 2",
  "language": "sample string 3",
  "pushEnabled": true,
  "municipalities": [
    "sample string 1",
    "sample string 2"
  ]
}

text/html

Sample:
{"deviceId":"sample string 1","deviceType":"sample string 2","language":"sample string 3","pushEnabled":true,"municipalities":["sample string 1","sample string 2"]}

application/xml, text/xml

Sample:
<SettingDto xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <DeviceId>sample string 1</DeviceId>
  <DeviceType>sample string 2</DeviceType>
  <Language>sample string 3</Language>
  <PushEnabled>true</PushEnabled>
  <Municipalities>
    <string>sample string 1</string>
    <string>sample string 2</string>
  </Municipalities>
</SettingDto>

Response Information

Resource Description

0 = Error occured ( an exception is raised ) or value > 0 = receipt number of the request.

SettingDto
NameDescriptionTypeAdditional information
DeviceId

ID of the device

string

None.

DeviceType

Type of device

string

None.

Language

Two letter Iso language for the notification Possible options are: "de, it, en, rm" (rm for ladin language)

string

None.

PushEnabled

true if push notification should be activated

boolean

None.

Municipalities

ISTAT code of italian municipalities enabled for the notification of weather alerts (021XXX -> Alto Adige Südtirol only)

Collection of string

None.

Response Formats

application/json, text/json

Sample:
{
  "deviceId": "sample string 1",
  "deviceType": "sample string 2",
  "language": "sample string 3",
  "pushEnabled": true,
  "municipalities": [
    "sample string 1",
    "sample string 2"
  ]
}

text/html

Sample:
{"deviceId":"sample string 1","deviceType":"sample string 2","language":"sample string 3","pushEnabled":true,"municipalities":["sample string 1","sample string 2"]}

application/xml, text/xml

Sample:
<SettingDto xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <DeviceId>sample string 1</DeviceId>
  <DeviceType>sample string 2</DeviceType>
  <Language>sample string 3</Language>
  <PushEnabled>true</PushEnabled>
  <Municipalities>
    <string>sample string 1</string>
    <string>sample string 2</string>
  </Municipalities>
</SettingDto>

text/javascript, application/javascript, application/json-p

Sample:
/**/ typeof  === 'function' && ({"deviceId":"sample string 1","deviceType":"sample string 2","language":"sample string 3","pushEnabled":true,"municipalities":["sample string 1","sample string 2"]});