POST apioauth/v4/movementalert

Create a movement alert

Request Information

URI Parameters

None.

Body Parameters

A CreateEditMovementAlertRequest

OAuthCreateEditMovementAlertRequest
NameDescriptionTypeAdditional information
Title

The alert title

string

None.

Message

The alert message

string

None.

AlertDistance

The alert distance in metres

integer

None.

SingleAlertPerJourney

If you want 1 alert per journey

boolean

None.

EmailRecipients

A list of email recipients

Collection of string

None.

ActiveStartTime

When you want the alert to be active from - The start time must be before the end time

time interval

None.

ActiveEndTime

When you want the alert to be active to - The start time must be before the end time

time interval

None.

ActiveDays

A bitmask of the days you want the alert to be active, eg Wed and Thurs would be 8 + 16 = 24

AlertDays

None.

ServiceIds

The service ids you want setting up on the alert

Collection of integer

None.

Request Formats

application/json, text/json

Sample:
{
  "Title": "sample string 1",
  "Message": "sample string 2",
  "AlertDistance": 3,
  "SingleAlertPerJourney": true,
  "EmailRecipients": [
    "sample string 1",
    "sample string 2"
  ],
  "ActiveStartTime": "00:00:00.1234567",
  "ActiveEndTime": "00:00:00.1234567",
  "ActiveDays": 1,
  "ServiceIds": [
    1,
    2
  ]
}

application/xml, text/xml

Sample:
<OAuthCreateEditMovementAlertRequest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Title>sample string 1</Title>
  <Message>sample string 2</Message>
  <AlertDistance>3</AlertDistance>
  <SingleAlertPerJourney>true</SingleAlertPerJourney>
  <EmailRecipients>
    <string>sample string 1</string>
    <string>sample string 2</string>
  </EmailRecipients>
  <ActiveStartTime />
  <ActiveEndTime />
  <ActiveDays>Sunday</ActiveDays>
  <ServiceIds>
    <long>1</long>
    <long>2</long>
  </ServiceIds>
</OAuthCreateEditMovementAlertRequest>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

The movement alert id

integer

Response Formats

application/json, text/json

Sample:
1

application/xml, text/xml

Sample:
<long>1</long>