Skip to main content
POST
/
notification
/
rule
/
{vehicle_id}
Add notification rule
curl --request POST \
  --url https://ctechnology.io/api/v2.2/notification/rule/{vehicle_id} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "operator": "NOTIF_OP_LT",
  "priority": "NOTIF_LOW",
  "property_indicator": "<string>",
  "value": 123,
  "value_key": "<string>",
  "tw_start": "<string>",
  "tw_end": "<string>",
  "tw_timezone": "<string>"
}
'
{
  "header": {
    "api_version": "<string>",
    "status": "<string>",
    "message": "<string>",
    "permission_via": [
      {
        "permission": "<string>",
        "via": "me",
        "organization_id": "<string>"
      }
    ]
  },
  "data": {
    "id": "<string>",
    "user_id": "<string>",
    "vehicle_id": "<string>",
    "operator": "NOTIF_OP_LT",
    "priority": "NOTIF_LOW",
    "property_indicator": "<string>",
    "value": 123,
    "value_key": "<string>",
    "tw_start": "<string>",
    "tw_end": "<string>",
    "tw_timezone": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Note that the API key has to be sent as Token 123 where 123 is the key you received after logging in or by creating on the developer dashboard.

Path Parameters

vehicle_id
string
required

ID of vehicle to add a new notification rule for.

Body

application/json

A rule that configures when a user should be notified of a vehicle's actions. As such, notification rules are always configured for a vehicle and user pair.

operator
enum<string>
required

The operator (if any) that is used to trigger the notification.

Available options:
NOTIF_OP_LT,
NOTIF_OP_GT,
NOTIF_OP_LT_TW,
NOTIF_OP_GT_TW,
NOTIF_OP_EQ,
NOTIF_OP_UEQ,
NOTIF_OP_ENTER,
NOTIF_OP_LEAVE,
NOTIF_OP_ACTION
priority
enum<string>
required

The priority with which the notification is generated. This tells if there will be simply an entry in the vehicle logbook, if a push notification on the web dashboard should be generated, or if a push notification (alert) on the user's smartphone should be generated.

Available options:
NOTIF_LOW,
NOTIF_HIGH,
NOTIF_ALERT
property_indicator
string
required

Indicates which property is generating the notification. Corresponds to vehicle actions, please consult the respective documentation.

value
number

The value which is used to trigger the notification generation (e.g., if NOTIF_OP_LT is chosen as an operator, a notification is generated as soon as the property becomes less than the value).

value_key
string

Certain notifications are generated based on other elements, whose key can be specified here. For example, this could be a geofence ID.

tw_start
string

The time window start, in ISO 8601 format. This is the time at which the notification generation starts.

tw_end
string

The time window end, in ISO 8601 format. This is the time at which the notification generation ends.

tw_timezone
string

The timezone in which the time window is specified

Response

Successful addition of the notification rule.

header
API Header Single · object
required

Default header sent along with single-resource responses.

data
Notification Rule · object
required

A rule that configures when a user should be notified of a vehicle's actions. As such, notification rules are always configured for a vehicle and user pair.