| Requires any of the roles: | Admin, TenantAdmin, Receptionist |
| POST | /notification | Creates a notification |
|---|
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Title | form | string | Yes | Notification title |
| RecipientType | form | RecipientType | Yes | Recipient type of the notificationAllowable Values
|
| NotificationType | form | NotificationType | Yes | The type of notificationAllowable Values
|
| Vibrate | form | boolean | No | Whether the notification should be accompanied by vibration |
| Description | form | string | No | Description for the notification |
| Roles | form | array | No | Roles of users to send notification to |
| MobileUserIds | form | array | No | Mobile users to send notification to |
| BusinessUserIds | form | array | No | Business users to send notification to |
| ThingIds | form | array | No | Things to send notification to |
| ThingTypeIds | form | array | No | Thing types to send notification to |
| AccessNotification | form | AccessNotificationDto | No | Data required to process access notifications. |
| OfferNotification | form | OfferNotificationDto | No | Data required to process offer notifications. |
| SmartSpaceNotification | form | SmartSpaceNotificationDto | No | Data required to process smartspace notifications. |
| SystemNotification | form | SystemNotificationDto | No | Data required to process system notifications. |
| TaskListNotification | form | TaskListNotificationDto | No | Data required to process task list notifications. |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Version | form | integer | No | Api version |
| Name | Value |
|---|---|
| Guest | 10 |
| AllGuests | 20 |
| StaffMember | 30 |
| AllStaff | 40 |
| Thing | 50 |
| ThingType | 60 |
| Role | 70 |
| User | 80 |
| Name | Value |
|---|---|
| Access | 10 |
| Offer | 20 |
| TaskList | 30 |
| System | 40 |
| SmartSpace | 50 |
| Alarm | 60 |
| Info | 70 |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| ReservationId | form | Guid | No | |
| AccessNotificationType | form | NotificationAccessType | No |
| Name | Value |
|---|---|
| New | 10 |
| ExpiringSoon | 20 |
| Revoked | 30 |
| Canceled | 40 |
| Denied | 50 |
| Unautorized | 60 |
| OpenDoor | 70 |
| ReservationDenied | 80 |
| ReservationConfirmed | 90 |
| ReservationCancelled | 100 |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| ServiceId | form | Guid | No | |
| OfferNotificationType | form | NotificationOfferType | No |
| Name | Value |
|---|---|
| Service | 10 |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| ThingId | form | Guid | No | |
| NotificationSmartSpaceType | form | NotificationSmartSpaceType | No |
| Name | Value |
|---|---|
| SensorThreshold | 10 |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| NotificationSystemType | form | NotificationSystemType | No |
| Name | Value |
|---|---|
| NewFeature | 10 |
| BugFix | 20 |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| TaskListId | form | Guid | No | |
| TaskListStatus | form | Status | No | |
| Categories | form | Category[] | No | |
| AssignedToMe | form | bool | No | |
| UnassignedCanAccept | form | bool | No | |
| TaskListNotificationType | form | NotificationTaskListType | No |
| Name | Value |
|---|---|
| ToDo | 0 |
| InProgress | 10 |
| Incomplete | 30 |
| Done | 40 |
| Name | Value |
|---|---|
| Cleaning | 10 |
| Maintenance | 20 |
| Disinfection | 30 |
| Inspection | 40 |
| Security | 50 |
| Name | Value |
|---|---|
| New | 10 |
| Updated | 20 |
| ExpiresSoon | 30 |
| Overdue | 40 |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Data | form | NotificationView | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| ResponseStatus | form | ResponseStatus | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | Guid | No | |
| Created | form | DateTime | No | |
| Title | form | string | No | |
| RecipientTypes | form | HashSet<RecipientType> | No | |
| NotificationType | form | NotificationType | No | |
| Vibrate | form | bool | No | |
| Description | form | string | No | |
| ServiceId | form | Guid? | No | |
| OrganizationId | form | Guid | No | |
| Deactivated | form | bool | No | |
| DeactivatedOn | form | DateTime? | No | |
| DeactivatedBy | form | int? | No | |
| Roles | form | HashSet<string> | No | |
| MobileUsers | form | HashSet<UserNotificationDto> | No | |
| BusinessUsers | form | HashSet<BusinessUserNotificationDto> | No | |
| Things | form | HashSet<ThingNotificationDto> | No | |
| ThingTypes | form | HashSet<ThingTypeNotificationDto> | No | |
| DomainData | form | IDomainNotification | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| UserId | form | int | No | |
| NotificationId | form | Guid | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| BusinessUserId | form | int | No | |
| NotificationId | form | Guid | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| ThingId | form | Guid | No | |
| NotificationId | form | Guid | No | |
| ThingName | form | string | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| ThingTypeId | form | Guid | No | |
| NotificationId | form | Guid | No |
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
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/xml
Content-Type: application/xml
Content-Length: length
<InsertNotification xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Viviot.Api.ServiceModel.Api.Business">
<Version xmlns="http://schemas.datacontract.org/2004/07/Viviot.Api.ServiceModel.Api.Base">0</Version>
<AccessNotification xmlns:d2p1="http://schemas.datacontract.org/2004/07/Viviot.Infrastructure.Dto.Notification">
<d2p1:AccessNotificationType>New</d2p1:AccessNotificationType>
<d2p1:ReservationId>00000000-0000-0000-0000-000000000000</d2p1:ReservationId>
</AccessNotification>
<BusinessUserIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:int>0</d2p1:int>
</BusinessUserIds>
<Description>String</Description>
<MobileUserIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:int>0</d2p1:int>
</MobileUserIds>
<NotificationType>Access</NotificationType>
<OfferNotification xmlns:d2p1="http://schemas.datacontract.org/2004/07/Viviot.Infrastructure.Dto.Notification">
<d2p1:OfferNotificationType>Service</d2p1:OfferNotificationType>
<d2p1:ServiceId>00000000-0000-0000-0000-000000000000</d2p1:ServiceId>
</OfferNotification>
<RecipientType>Guest</RecipientType>
<Roles xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</Roles>
<SmartSpaceNotification xmlns:d2p1="http://schemas.datacontract.org/2004/07/Viviot.Infrastructure.Dto.Notification">
<d2p1:NotificationSmartSpaceType>SensorThreshold</d2p1:NotificationSmartSpaceType>
<d2p1:ThingId>00000000-0000-0000-0000-000000000000</d2p1:ThingId>
</SmartSpaceNotification>
<SystemNotification xmlns:d2p1="http://schemas.datacontract.org/2004/07/Viviot.Infrastructure.Dto.Notification">
<d2p1:NotificationSystemType>NewFeature</d2p1:NotificationSystemType>
</SystemNotification>
<TaskListNotification xmlns:d2p1="http://schemas.datacontract.org/2004/07/Viviot.Infrastructure.Dto.Notification">
<d2p1:AssignedToMe>false</d2p1:AssignedToMe>
<d2p1:Categories xmlns:d3p1="http://schemas.datacontract.org/2004/07/Viviot.Infrastructure.Enums">
<d3p1:Category>Cleaning</d3p1:Category>
</d2p1:Categories>
<d2p1:TaskListId>00000000-0000-0000-0000-000000000000</d2p1:TaskListId>
<d2p1:TaskListNotificationType>New</d2p1:TaskListNotificationType>
<d2p1:TaskListStatus>ToDo</d2p1:TaskListStatus>
<d2p1:UnassignedCanAccept>false</d2p1:UnassignedCanAccept>
</TaskListNotification>
<ThingIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:guid>00000000-0000-0000-0000-000000000000</d2p1:guid>
</ThingIds>
<ThingTypeIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:guid>00000000-0000-0000-0000-000000000000</d2p1:guid>
</ThingTypeIds>
<Title>String</Title>
<Vibrate>false</Vibrate>
</InsertNotification>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<NotificationResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Viviot.Api.ServiceModel.Api.Business">
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types" xmlns="http://schemas.datacontract.org/2004/07/Viviot.Api.ServiceModel.Api.Base">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
<d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</d2p1:Meta>
</d2p1:ResponseError>
</d2p1:Errors>
<d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:Meta>
</ResponseStatus>
<Data xmlns:d2p1="http://schemas.datacontract.org/2004/07/Viviot.Api.ServiceModel.Views.Business.Notification">
<d2p1:BusinessUsers xmlns:d3p1="http://schemas.datacontract.org/2004/07/Viviot.Infrastructure.Dto.Notification">
<d3p1:BusinessUserNotificationDto>
<d3p1:BusinessUserId>0</d3p1:BusinessUserId>
<d3p1:NotificationId>00000000-0000-0000-0000-000000000000</d3p1:NotificationId>
</d3p1:BusinessUserNotificationDto>
</d2p1:BusinessUsers>
<d2p1:Created>0001-01-01T00:00:00</d2p1:Created>
<d2p1:Deactivated>false</d2p1:Deactivated>
<d2p1:DeactivatedBy>0</d2p1:DeactivatedBy>
<d2p1:DeactivatedOn>0001-01-01T00:00:00</d2p1:DeactivatedOn>
<d2p1:Description>String</d2p1:Description>
<d2p1:DomainData i:nil="true" />
<d2p1:Id>00000000-0000-0000-0000-000000000000</d2p1:Id>
<d2p1:MobileUsers xmlns:d3p1="http://schemas.datacontract.org/2004/07/Viviot.Infrastructure.Dto.Notification">
<d3p1:UserNotificationDto>
<d3p1:NotificationId>00000000-0000-0000-0000-000000000000</d3p1:NotificationId>
<d3p1:UserId>0</d3p1:UserId>
</d3p1:UserNotificationDto>
</d2p1:MobileUsers>
<d2p1:NotificationType>Access</d2p1:NotificationType>
<d2p1:OrganizationId>00000000-0000-0000-0000-000000000000</d2p1:OrganizationId>
<d2p1:RecipientTypes xmlns:d3p1="http://schemas.datacontract.org/2004/07/Viviot.Domain.AggregateModel.NotificationAggregate">
<d3p1:RecipientType>Guest</d3p1:RecipientType>
</d2p1:RecipientTypes>
<d2p1:Roles xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:string>String</d3p1:string>
</d2p1:Roles>
<d2p1:ServiceId>00000000-0000-0000-0000-000000000000</d2p1:ServiceId>
<d2p1:ThingTypes xmlns:d3p1="http://schemas.datacontract.org/2004/07/Viviot.Infrastructure.Dto.Notification">
<d3p1:ThingTypeNotificationDto>
<d3p1:NotificationId>00000000-0000-0000-0000-000000000000</d3p1:NotificationId>
<d3p1:ThingTypeId>00000000-0000-0000-0000-000000000000</d3p1:ThingTypeId>
</d3p1:ThingTypeNotificationDto>
</d2p1:ThingTypes>
<d2p1:Things xmlns:d3p1="http://schemas.datacontract.org/2004/07/Viviot.Infrastructure.Dto.Notification">
<d3p1:ThingNotificationDto>
<d3p1:NotificationId>00000000-0000-0000-0000-000000000000</d3p1:NotificationId>
<d3p1:ThingId>00000000-0000-0000-0000-000000000000</d3p1:ThingId>
<d3p1:ThingName>String</d3p1:ThingName>
</d3p1:ThingNotificationDto>
</d2p1:Things>
<d2p1:Title>String</d2p1:Title>
<d2p1:Vibrate>false</d2p1:Vibrate>
</Data>
</NotificationResponse>