Requires any of the roles: | SystemAdministrator, Manager, Customer |
GET | /notifications |
---|
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Voice.Api.Notifications
Imports Voice.Api
Imports Voice.Api.Customers
Imports Voice.Api.Files
Imports Voice.Api.Accounts
Namespace Global
Namespace Voice.Api
Public Partial Class EntityInfo
'''<Summary>
'''The ID of the object
'''</Summary>
<ApiMember(Description:="The ID of the object")>
Public Overridable Property Id As String
'''<Summary>
'''The date the object was created
'''</Summary>
<ApiMember(Description:="The date the object was created")>
Public Overridable Property DateCreated As String
'''<Summary>
'''The date the object was last modified
'''</Summary>
<ApiMember(Description:="The date the object was last modified")>
Public Overridable Property DateLastModified As String
'''<Summary>
'''The user that created this object
'''</Summary>
<ApiMember(Description:="The user that created this object")>
Public Overridable Property CreatedBy As String
'''<Summary>
'''The user that last modified this object
'''</Summary>
<ApiMember(Description:="The user that last modified this object")>
Public Overridable Property LastModifiedBy As String
End Class
Public Partial Class ListRequest(Of T)
Implements IGet
'''<Summary>
'''The page of data to retrieve
'''</Summary>
<ApiMember(Description:="The page of data to retrieve")>
Public Overridable Property Page As Integer
'''<Summary>
'''If you want all objects to be returned. This should be used with care
'''</Summary>
<ApiMember(Description:="If you want all objects to be returned. This should be used with care")>
Public Overridable Property All As Boolean
'''<Summary>
'''The number per page to retrieve
'''</Summary>
<ApiMember(Description:="The number per page to retrieve")>
Public Overridable Property CountPerPage As Integer
'''<Summary>
'''Specific IDs
'''</Summary>
<ApiMember(Description:="Specific IDs")>
Public Overridable Property SpecificIds As List(Of String)
'''<Summary>
'''Specify a sort field
'''</Summary>
<ApiMember(Description:="Specify a sort field")>
Public Overridable Property SortField As String
'''<Summary>
'''Specify a sort order
'''</Summary>
<ApiMember(Description:="Specify a sort order")>
Public Overridable Property SortOrder As SortOrders
'''<Summary>
'''Disables total / page counts - improves performance. Returns only data. If there is no more data, Items will be empty array
'''</Summary>
<ApiMember(Description:="Disables total / page counts - improves performance. Returns only data. If there is no more data, Items will be empty array")>
Public Overridable Property SimplifiedPaging As Boolean
End Class
Public Partial Class ListResponse(Of T)
'''<Summary>
'''The items
'''</Summary>
<ApiMember(Description:="The items")>
Public Overridable Property Items As List(Of AccountInfo)
'''<Summary>
'''The total number of items
'''</Summary>
<ApiMember(Description:="The total number of items")>
Public Overridable Property TotalCount As Integer
'''<Summary>
'''The total number of pages
'''</Summary>
<ApiMember(Description:="The total number of pages")>
Public Overridable Property TotalPages As Integer
'''<Summary>
'''Are there more pages of items? Used with simplified paging
'''</Summary>
<ApiMember(Description:="Are there more pages of items? Used with simplified paging")>
Public Overridable Property HasMorePages As Boolean
End Class
Public Enum SortOrders
Ascend
Descend
End Enum
End Namespace
Namespace Voice.Api.Accounts
Public Partial Class AccountInfo
Inherits EntityInfo
'''<Summary>
'''The name of this account
'''</Summary>
<ApiMember(Description:="The name of this account")>
Public Overridable Property Name As String
'''<Summary>
'''The ID of this account's parent
'''</Summary>
<ApiMember(Description:="The ID of this account's parent")>
Public Overridable Property ParentAccountId As String
'''<Summary>
'''The twilio account SID
'''</Summary>
<ApiMember(Description:="The twilio account SID")>
Public Overridable Property TwilioAccountSid As String
'''<Summary>
'''The ancestors of this account. Useful for breadcrumbs
'''</Summary>
<ApiMember(Description:="The ancestors of this account. Useful for breadcrumbs")>
Public Overridable Property AncestorIds As List(Of String)
'''<Summary>
'''The max number of phone numbers this account can have
'''</Summary>
<ApiMember(Description:="The max number of phone numbers this account can have")>
Public Overridable Property MaxPhoneNumbers As Integer
'''<Summary>
'''This account is BYOA
'''</Summary>
<ApiMember(Description:="This account is BYOA")>
Public Overridable Property IsBYOA As Boolean
'''<Summary>
'''TrustHub Profile Sid
'''</Summary>
<ApiMember(Description:="TrustHub Profile Sid")>
Public Overridable Property TrustHubProfileSid As String
'''<Summary>
'''The ID of the logo file
'''</Summary>
<ApiMember(Description:="The ID of the logo file")>
Public Overridable Property LogoId As String
'''<Summary>
'''The URI of the logo file
'''</Summary>
<ApiMember(Description:="The URI of the logo file")>
Public Overridable Property LogoUri As String
'''<Summary>
'''The billing settings for this account
'''</Summary>
<ApiMember(Description:="The billing settings for this account")>
Public Overridable Property BillingSettings As BillingSettings
End Class
Public Partial Class BillingItem
Public Overridable Property BaseCost As Double
Public Overridable Property RawUnitMultiplier As Double
Public Overridable Property UnitCost As Double
Public Overridable Property Allowance As Integer
End Class
Public Partial Class BillingSettings
Public Overridable Property Base As BillingItem
Public Overridable Property LocalNumbers As BillingItem
Public Overridable Property TollFreeNumbers As BillingItem
Public Overridable Property InboundVoiceCalls As BillingItem
Public Overridable Property OutboundVoiceCalls As BillingItem
Public Overridable Property InboundFaxes As BillingItem
Public Overridable Property OutboundFaxes As BillingItem
Public Overridable Property InboundSmsMessages As BillingItem
Public Overridable Property OutboundSmsMessages As BillingItem
Public Overridable Property AIInsights As BillingItem
Public Overridable Property AILiveMinutes As BillingItem
End Class
End Namespace
Namespace Voice.Api.Customers
Public Partial Class CustomerBreadcrumb
Public Overridable Property Id As String
Public Overridable Property Name As String
End Class
End Namespace
Namespace Voice.Api.Files
Public Partial Class FileInfo
Inherits EntityInfo
'''<Summary>
'''The type of file this is
'''</Summary>
<ApiMember(Description:="The type of file this is")>
Public Overridable Property Type As FileTypes
'''<Summary>
'''The account ID this file is associated with
'''</Summary>
<ApiMember(Description:="The account ID this file is associated with")>
Public Overridable Property AccountId As String
'''<Summary>
'''The name of the account this file is associated with
'''</Summary>
<ApiMember(Description:="The name of the account this file is associated with")>
Public Overridable Property AccountName As String
'''<Summary>
'''The ID of the customer this file is associated with
'''</Summary>
<ApiMember(Description:="The ID of the customer this file is associated with")>
Public Overridable Property CustomerId As String
'''<Summary>
'''The name of the customer this file is associated with
'''</Summary>
<ApiMember(Description:="The name of the customer this file is associated with")>
Public Overridable Property CustomerName As String
'''<Summary>
'''The breadcrumb to the customer for this file
'''</Summary>
<ApiMember(Description:="The breadcrumb to the customer for this file")>
Public Overridable Property CustomerBreadcrumb As List(Of CustomerBreadcrumb)
'''<Summary>
'''The ID of the user this file is assocaited with
'''</Summary>
<ApiMember(Description:="The ID of the user this file is assocaited with")>
Public Overridable Property UserId As String
'''<Summary>
'''The name of the user this file is associated with
'''</Summary>
<ApiMember(Description:="The name of the user this file is associated with")>
Public Overridable Property UserName As String
'''<Summary>
'''The original file name for the file
'''</Summary>
<ApiMember(Description:="The original file name for the file")>
Public Overridable Property FileName As String
'''<Summary>
'''The URI of the file
'''</Summary>
<ApiMember(Description:="The URI of the file")>
Public Overridable Property Uri As String
'''<Summary>
'''The Content type of the file
'''</Summary>
<ApiMember(Description:="The Content type of the file")>
Public Overridable Property ContentType As String
'''<Summary>
'''The size of the file
'''</Summary>
<ApiMember(Description:="The size of the file")>
Public Overridable Property ContentLength As Long
'''<Summary>
'''The Twilio ID of the recording
'''</Summary>
<ApiMember(Description:="The Twilio ID of the recording")>
Public Overridable Property RecordingSid As String
'''<Summary>
'''The duration of the recording in seconds
'''</Summary>
<ApiMember(Description:="The duration of the recording in seconds")>
Public Overridable Property RecordingDuration As Integer
'''<Summary>
'''Who is the recording from?
'''</Summary>
<ApiMember(Description:="Who is the recording from?")>
Public Overridable Property RecordingFrom As String
'''<Summary>
'''Transcription (if available)
'''</Summary>
<ApiMember(Description:="Transcription (if available)")>
Public Overridable Property Transcription As String
'''<Summary>
'''From Address (e.g. caller ID) for incoming calls
'''</Summary>
<ApiMember(Description:="From Address (e.g. caller ID) for incoming calls")>
Public Overridable Property FromAddress As String
'''<Summary>
'''To Address (e.g. dialed number) for outgoing calls
'''</Summary>
<ApiMember(Description:="To Address (e.g. dialed number) for outgoing calls")>
Public Overridable Property ToAddress As String
'''<Summary>
'''The AI transcription for this call
'''</Summary>
<ApiMember(Description:="The AI transcription for this call")>
Public Overridable Property AITranscription As String
End Class
Public Enum FileTypes
Upload
VoiceMessage
CallRecording
Fax
Attachment
FaxOutgoing
End Enum
End Namespace
Namespace Voice.Api.Notifications
'''<Summary>
'''Lists all endpoints
'''</Summary>
<Api(Description:="Lists all endpoints")>
Public Partial Class ListNotifications
Inherits ListRequest(Of NotificationInfo)
'''<Summary>
'''The IDs of the account whose notifications you want to retrieve
'''</Summary>
<ApiMember(Description:="The IDs of the account whose notifications you want to retrieve")>
Public Overridable Property AccountIds As List(Of String)
'''<Summary>
'''The IDs of the customers whose notifications you want to retrieve
'''</Summary>
<ApiMember(Description:="The IDs of the customers whose notifications you want to retrieve")>
Public Overridable Property CustomerIds As List(Of String)
'''<Summary>
'''Filter by From
'''</Summary>
<ApiMember(Description:="Filter by From")>
Public Overridable Property FromFilter As String
'''<Summary>
'''Filter by To
'''</Summary>
<ApiMember(Description:="Filter by To")>
Public Overridable Property ToFilter As String
'''<Summary>
'''Filter by Subject
'''</Summary>
<ApiMember(Description:="Filter by Subject")>
Public Overridable Property SubjectFilter As String
'''<Summary>
'''The start date to retrieve usage records for (YYYY-MM-DD)
'''</Summary>
<ApiMember(Description:="The start date to retrieve usage records for (YYYY-MM-DD)")>
Public Overridable Property StartDate As String
'''<Summary>
'''The end date to retrieve usage records for (YYYY-MM-DD)
'''</Summary>
<ApiMember(Description:="The end date to retrieve usage records for (YYYY-MM-DD)")>
Public Overridable Property EndDate As String
'''<Summary>
'''Filter by type
'''</Summary>
<ApiMember(Description:="Filter by type")>
Public Overridable Property Type As NotificationTypes?
End Class
Public Partial Class NotificationInfo
Inherits EntityInfo
'''<Summary>
'''The account ID this endpoint is associated with
'''</Summary>
<ApiMember(Description:="The account ID this endpoint is associated with")>
Public Overridable Property AccountId As String
'''<Summary>
'''The name of the account this endpoint is associated with
'''</Summary>
<ApiMember(Description:="The name of the account this endpoint is associated with")>
Public Overridable Property AccountName As String
'''<Summary>
'''The ID of the customer this endpoint is associated with
'''</Summary>
<ApiMember(Description:="The ID of the customer this endpoint is associated with")>
Public Overridable Property CustomerId As String
'''<Summary>
'''The name of the customer this endpoint is associated with
'''</Summary>
<ApiMember(Description:="The name of the customer this endpoint is associated with")>
Public Overridable Property CustomerName As String
'''<Summary>
'''The breadcrumb to the customer for this endpoint
'''</Summary>
<ApiMember(Description:="The breadcrumb to the customer for this endpoint")>
Public Overridable Property CustomerBreadcrumb As List(Of CustomerBreadcrumb)
'''<Summary>
'''The type of notification
'''</Summary>
<ApiMember(Description:="The type of notification")>
Public Overridable Property Type As NotificationTypes
'''<Summary>
'''The subject of the notification
'''</Summary>
<ApiMember(Description:="The subject of the notification")>
Public Overridable Property Subject As String
'''<Summary>
'''The body of the notification
'''</Summary>
<ApiMember(Description:="The body of the notification")>
Public Overridable Property Body As String
'''<Summary>
'''The recipients of this notification
'''</Summary>
<ApiMember(Description:="The recipients of this notification")>
Public Overridable Property Recipients As List(Of NotificationRecipientInfo)
'''<Summary>
'''The list of attachments
'''</Summary>
<ApiMember(Description:="The list of attachments")>
Public Overridable Property Attachments As List(Of FileInfo)
'''<Summary>
'''The original from for the session
'''</Summary>
<ApiMember(Description:="The original from for the session")>
Public Overridable Property From As String
'''<Summary>
'''The original To for the session
'''</Summary>
<ApiMember(Description:="The original To for the session")>
Public Overridable Property [To] As String
'''<Summary>
'''Was there an error?
'''</Summary>
<ApiMember(Description:="Was there an error?")>
Public Overridable Property [Error] As Boolean
'''<Summary>
'''The error message
'''</Summary>
<ApiMember(Description:="The error message")>
Public Overridable Property ErrorMessage As String
End Class
Public Partial Class NotificationRecipientInfo
'''<Summary>
'''The address of the recipient
'''</Summary>
<ApiMember(Description:="The address of the recipient")>
Public Overridable Property Address As String
'''<Summary>
'''Extra info about the recipient e.g. CC, BCC
'''</Summary>
<ApiMember(Description:="Extra info about the recipient e.g. CC, BCC")>
Public Overridable Property Extra As String
'''<Summary>
'''The name of the recipient
'''</Summary>
<ApiMember(Description:="The name of the recipient")>
Public Overridable Property Name As String
End Class
Public Enum NotificationTypes
Email
Sms
Push
IncomingCall
OutgoingCall
End Enum
End Namespace
End Namespace
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
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /notifications HTTP/1.1 Host: team.evovoice.io Accept: application/json
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"items":[{"accountId":"String","accountName":"String","customerId":"String","customerName":"String","customerBreadcrumb":[{"id":"String","name":"String"}],"type":"Email","subject":"String","body":"String","recipients":[{"address":"String","extra":"String","name":"String"}],"attachments":[{"type":"Upload","accountId":"String","accountName":"String","customerId":"String","customerName":"String","customerBreadcrumb":[{"id":"String","name":"String"}],"userId":"String","userName":"String","fileName":"String","uri":"String","contentType":"String","contentLength":0,"recordingSid":"String","recordingDuration":0,"recordingFrom":"String","transcription":"String","fromAddress":"String","toAddress":"String","aiTranscription":"String","id":"String","dateCreated":"String","dateLastModified":"String","createdBy":"String","lastModifiedBy":"String"}],"from":"String","to":"String","error":false,"errorMessage":"String","id":"String","dateCreated":"String","dateLastModified":"String","createdBy":"String","lastModifiedBy":"String"}],"totalCount":0,"totalPages":0,"hasMorePages":false}