Post create a subscription
post
{basePath}/notifications/subscriptions
The API creates a subscription to a resource for the current subscriber.
Request
Supported Media Types
- application/json
The subscriptionViewModel
Root Schema : SubscriptionViewModel
Type:
object
A Subscription subset with the exclusions of subscriptionId and subscriberId
Show Source
-
callbackUri(required):
string
Callback Uri for the subscription's notifications.
-
locRef:
string
The location identifier for this subscription.
-
messageType(required):
object MessageType
Information about the type of message.
-
orgShortName(required):
string
The organization identifier for this subscription.
-
postOfficeOptions(required):
object PostOfficeOptions
Information about the PostOffice for the subscription
-
rvcRef:
string
The revenue center identifier for this subscription.
Nested Schema : MessageType
Type:
object
Information about the type of message.
Show Source
-
id(required):
string
Identifier of the message type [Source - POS] "CheckNotification", "OrganizationsNotification", "ConfigurationNotification" supports organization, property, and revenue center hierarchy level subscriptions. "EmployeesNotification" supports organization, and property hierarchy level subscriptions.Example:
{ "id":"CheckNotification" }
Nested Schema : PostOfficeOptions
Type:
object
Information about the PostOffice for the subscription
Show Source
-
PostOfficeType:
string
Information about the PostOffice for the subscription Valid values are "PushOnePostOffice"
Response
Supported Media Types
- application/json
200 Response
The subscription
Root Schema : Subscription
Type:
object
A Subscription
Show Source
-
callbackUri(required):
string
Callback Uri for the subscription's notifications.
-
locRef:
string
The location identifier for this subscription.
-
messageType(required):
object MessageType
Information about the type of message.
-
orgShortName(required):
string
The organization identifier for this subscription.
-
postOfficeOptions(required):
object PostOfficeOptions
Information about the PostOffice for the subscription
-
rvcRef:
string
The revenue center identifier for this subscription.
-
subscriptionId(required):
string
Identifier(GUID) of this subscription.
Nested Schema : MessageType
Type:
object
Information about the type of message.
Show Source
-
id(required):
string
Identifier of the message type [Source - POS] "CheckNotification", "OrganizationsNotification", "ConfigurationNotification" supports organization, property, and revenue center hierarchy level subscriptions. "EmployeesNotification" supports organization, and property hierarchy level subscriptions.Example:
{ "id":"CheckNotification" }
Nested Schema : PostOfficeOptions
Type:
object
Information about the PostOffice for the subscription
Show Source
-
PostOfficeType:
string
Information about the PostOffice for the subscription Valid values are "PushOnePostOffice"
400 Response
400 Bad Request
Note - A subscription for message type ID 'EmployeesNotification' will return 400 if RvcRef has a value. Such a subscription would never receive any notifications.
Root Schema : NotificationsApiBadRequest
400 Bad Request
403 Response
403 Forbidden
404 Response
404 Requested resource not found
Examples
Example Request Body
The following example shows the contents of the request body in JSON format:
{
"callbackUri": "string",
"messageType": {
"id": "CheckNotification"
},
"postOfficeOptions": {
"PostOfficeType": "string"
},
"orgShortName": "string",
"locRef": "string",
"rvcRef": "string"
}
Example Response Body
The following example shows the contents of the response body in JSON format:
{
"subscriptionId": "string",
"callbackUri": "string",
"messageType": {
"id": "CheckNotification"
},
"postOfficeOptions": {
"PostOfficeType": "string"
},
"orgShortName": "string",
"locRef": "string",
"rvcRef": "string"
}