Viviot.Api

<back to all web services

InsertNotification

Requires Authentication
Requires any of the roles:Admin, TenantAdmin, Receptionist
The following routes are available for this service:
POST/notificationCreates a notification
BaseNotification Parameters:
NameParameterData TypeRequiredDescription
TitleformstringYesNotification title
RecipientTypeformRecipientTypeYesRecipient type of the notification

Allowable Values

  • Guest
  • AllGuests
  • StaffMember
  • AllStaff
  • Thing
  • ThingType
  • Role
  • User
NotificationTypeformNotificationTypeYesThe type of notification

Allowable Values

  • Access
  • Offer
  • TaskList
  • System
  • SmartSpace
  • Alarm
  • Info
VibrateformbooleanNoWhether the notification should be accompanied by vibration
DescriptionformstringNoDescription for the notification
RolesformarrayNoRoles of users to send notification to
MobileUserIdsformarrayNoMobile users to send notification to
BusinessUserIdsformarrayNoBusiness users to send notification to
ThingIdsformarrayNoThings to send notification to
ThingTypeIdsformarrayNoThing types to send notification to
AccessNotificationformAccessNotificationDtoNoData required to process access notifications.
OfferNotificationformOfferNotificationDtoNoData required to process offer notifications.
SmartSpaceNotificationformSmartSpaceNotificationDtoNoData required to process smartspace notifications.
SystemNotificationformSystemNotificationDtoNoData required to process system notifications.
TaskListNotificationformTaskListNotificationDtoNoData required to process task list notifications.
BaseRequest Parameters:
NameParameterData TypeRequiredDescription
VersionformintegerNoApi version
RecipientType Enum:
NameValue
Guest10
AllGuests20
StaffMember30
AllStaff40
Thing50
ThingType60
Role70
User80
NotificationType Enum:
NameValue
Access10
Offer20
TaskList30
System40
SmartSpace50
Alarm60
Info70
AccessNotificationDto Parameters:
NameParameterData TypeRequiredDescription
ReservationIdformGuidNo
AccessNotificationTypeformNotificationAccessTypeNo
NotificationAccessType Enum:
NameValue
New10
ExpiringSoon20
Revoked30
Canceled40
Denied50
Unautorized60
OpenDoor70
ReservationDenied80
ReservationConfirmed90
ReservationCancelled100
OfferNotificationDto Parameters:
NameParameterData TypeRequiredDescription
ServiceIdformGuidNo
OfferNotificationTypeformNotificationOfferTypeNo
NotificationOfferType Enum:
NameValue
Service10
SmartSpaceNotificationDto Parameters:
NameParameterData TypeRequiredDescription
ThingIdformGuidNo
NotificationSmartSpaceTypeformNotificationSmartSpaceTypeNo
NotificationSmartSpaceType Enum:
NameValue
SensorThreshold10
SystemNotificationDto Parameters:
NameParameterData TypeRequiredDescription
NotificationSystemTypeformNotificationSystemTypeNo
NotificationSystemType Enum:
NameValue
NewFeature10
BugFix20
TaskListNotificationDto Parameters:
NameParameterData TypeRequiredDescription
TaskListIdformGuidNo
TaskListStatusformStatusNo
CategoriesformCategory[]No
AssignedToMeformboolNo
UnassignedCanAcceptformboolNo
TaskListNotificationTypeformNotificationTaskListTypeNo
Status Enum:
NameValue
ToDo0
InProgress10
Incomplete30
Done40
Category Enum:
NameValue
Cleaning10
Maintenance20
Disinfection30
Inspection40
Security50
NotificationTaskListType Enum:
NameValue
New10
Updated20
ExpiresSoon30
Overdue40
NotificationResponse Parameters:
NameParameterData TypeRequiredDescription
DataformNotificationViewNo
BaseResponse Parameters:
NameParameterData TypeRequiredDescription
ResponseStatusformResponseStatusNo
NotificationView Parameters:
NameParameterData TypeRequiredDescription
IdformGuidNo
CreatedformDateTimeNo
TitleformstringNo
RecipientTypesformHashSet<RecipientType>No
NotificationTypeformNotificationTypeNo
VibrateformboolNo
DescriptionformstringNo
ServiceIdformGuid?No
OrganizationIdformGuidNo
DeactivatedformboolNo
DeactivatedOnformDateTime?No
DeactivatedByformint?No
RolesformHashSet<string>No
MobileUsersformHashSet<UserNotificationDto>No
BusinessUsersformHashSet<BusinessUserNotificationDto>No
ThingsformHashSet<ThingNotificationDto>No
ThingTypesformHashSet<ThingTypeNotificationDto>No
DomainDataformIDomainNotificationNo
UserNotificationDto Parameters:
NameParameterData TypeRequiredDescription
UserIdformintNo
NotificationIdformGuidNo
BusinessUserNotificationDto Parameters:
NameParameterData TypeRequiredDescription
BusinessUserIdformintNo
NotificationIdformGuidNo
ThingNotificationDto Parameters:
NameParameterData TypeRequiredDescription
ThingIdformGuidNo
NotificationIdformGuidNo
ThingNameformstringNo
ThingTypeNotificationDto Parameters:
NameParameterData TypeRequiredDescription
ThingTypeIdformGuidNo
NotificationIdformGuidNo

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /notification HTTP/1.1 
Host: api.4spaces.io 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"title":"String","recipientType":10,"notificationType":10,"vibrate":false,"description":"String","roles":["String"],"mobileUserIds":[0],"businessUserIds":[0],"thingIds":["00000000000000000000000000000000"],"thingTypeIds":["00000000000000000000000000000000"],"accessNotification":{"reservationId":"00000000000000000000000000000000","accessNotificationType":10},"offerNotification":{"serviceId":"00000000000000000000000000000000","offerNotificationType":10},"smartSpaceNotification":{"thingId":"00000000000000000000000000000000","notificationSmartSpaceType":10},"systemNotification":{"notificationSystemType":10},"taskListNotification":{"taskListId":"00000000000000000000000000000000","taskListStatus":0,"categories":[10],"assignedToMe":false,"unassignedCanAccept":false,"taskListNotificationType":10},"version":0}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"data":{"id":"00000000000000000000000000000000","created":-62135596800000,"title":"String","recipientTypes":[10],"notificationType":10,"vibrate":false,"description":"String","serviceId":"00000000000000000000000000000000","organizationId":"00000000000000000000000000000000","deactivated":false,"deactivatedOn":-62135596800000,"deactivatedBy":0,"roles":["String"],"mobileUsers":[{"userId":0,"notificationId":"00000000000000000000000000000000"}],"businessUsers":[{"businessUserId":0,"notificationId":"00000000000000000000000000000000"}],"things":[{"thingId":"00000000000000000000000000000000","notificationId":"00000000000000000000000000000000","thingName":"String"}],"thingTypes":[{"thingTypeId":"00000000000000000000000000000000","notificationId":"00000000000000000000000000000000"}]},"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}