POST - Notification

The Notification Services endpoint allows users to create, update, and delete a Notification within Freight Portal. Notifications can be generated with custom data points that will allow the user to set stop or shipment level notifications, choose the type of notification that is relevant, and ultimately add any filters that would apply in order to be notified when changes occur on the shipments that meet the filter criteria that has been specified.

In order to get started. you'll have to create a basic Notification Object. The following guides below, help you create (POST), update (PUT), pull back (GET), and Delete (DELETE) a Notification.

Creating a Notification

The POST customnotifications endpoint allows the creation of a specific Notification formula in the Freight Portal.

Here is the POST HTTP Endpoint:

HTTP Verb: POST
URI: https://{domain}.dataview.services.10-4.com/v1/customnotifications
Authentication: Bearer Token

Adding the Notification Reference Details

To create a basic Notification, certain parameters are required. Below are the details of those parameters:

notificationName

String

The external reference to the Custom Notification's name.

notificationRecipientType

String

Type of communication desired on the notification.

notificationTypeLabel

String

Type of notification being setup.

notificationTypes

Array

Sub-type of notificationTypeLabel

notifyStopContactsByEmail

Boolean

Conditionally required if notificationRecipientType is set to stopLevel.

notifyStopContactsBySms

Boolean

Conditionally required if notificationRecipientType is set to stopLevel.

emailList

Array

Conditionally required if notificationRecipientType is set to shipmentLevel.

smsList

Array

Conditionally required if notificationRecipientType is set to shipmentLevel. Phone numbers need to be in E.164 format or US numbers will default to +1 if not defined.

Below is a basic example of a Notification setup for shipmentStatusChange notification type for both a shipmentLevel notificationRecipientType as well as a stopLevel example as well.

{
            "notificationName": "Basic Notification shipmentStatusChange - All12",
            "notificationRecipientType": "shipmentLevel",
            "notificationTypeLabel": "shipmentStatusChange",
            "notificationTypes": [
                "ShipmentStatusEnRoute",
                "ShipmentStatusAtShipper",
                "ShipmentStatusInTransit",
                "ShipmentStatusAtConsignee",
				"ShipmentStatusDelivered"

            ],
            "emailList": [
            "[email protected]"
            ],
            "smsList": [+15555551212]
        }
{
            "notificationName": "Basic Not. shipmentStatusChange - All - Stop Level",
            "notificationRecipientType": "stoplevel",
            "notificationTypeLabel": "shipmentStatusChange",
            "notificationTypes": [
                "ShipmentStatusEnRoute",
                "ShipmentStatusAtShipper",
                "ShipmentStatusInTransit"
            ],
            "notifyStopContactsByEmail": true,
            "notifyStopContactsBySms": false
        }

Success Response:

{
    "data": [
        {
            "notificationGuid": "8a9aa2c6-0201-cb-9ace-d92a55d6c951",
            "notificationName": "Basic Notification shipmentStatusChange - All12",
            "notificationRecipientType": "shipmentLevel",
            "notificationTypeLabel": "shipmentStatusChange",
            "notifyStopContactsByEmail": false,
            "notifyStopContactsBySms": false,
            "notificationMetaData": null,
            "notificationTypes": [
                "ShipmentStatusEnRoute",
                "ShipmentStatusAtShipper",
                "ShipmentStatusInTransit",
                "ShipmentStatusAtConsignee",
                "ShipmentStatusDelivered"
            ],
            "filters": [],
            "lastUpdateUserName": "[email protected]",
            "lastUpdateDate": "2019-01-31T02:34:36.4485331+00:00",
            "emailList": [
                "[email protected]"
            ],
            "smsList": [
                "5555551212"
            ]
        }
    ],
    "messages": [],
    "totalPossibleCount": 1
}