BokaMera.API.Host

<back to all web services

ListWebhookMessages

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
GET/webhook/messagesList webhook message
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports BokaMera.API.ServiceModel.Dtos
Imports Webhook.Service.External.Models.Models

Namespace Global

    Namespace BokaMera.API.ServiceModel.Dtos

        <ApiResponse(Description:="You were unauthorized to call this service", StatusCode:=401)>
        <ValidateRequest(Validator:="IsAuthenticated")>
        Public Partial Class ListWebhookMessages
            Inherits ListMessagesRequestDto
            Implements ICompany
            '''<Summary>
            '''The company id, if empty will use the company id for the user you are logged in with.
            '''</Summary>
            <ApiMember(Description:="The company id, if empty will use the company id for the user you are logged in with.", IsRequired:=true, ParameterType:="query")>
            Public Overridable Property CompanyId As Guid? Implements ICompany.CompanyId
        End Class
    End Namespace

    Namespace Webhook.Service.External.Models.Models

        Public Partial Class ClientWebhookRequestBase
            Public Overridable Property ClientId As Guid
        End Class

        Public Partial Class GetMessageResponseDto
            Public Overridable Property Id As String
            Public Overridable Property Channels As List(Of String) = New List(Of String)
            Public Overridable Property EventType As String
            Public Overridable Property Metadata As Dictionary(Of String, String)
            Public Overridable Property Payload As Object
            Public Overridable Property EventId As String
            Public Overridable Property Timestamp As Date
        End Class

        Public Partial Class ListMessagesRequestDto
            Inherits ClientWebhookRequestBase
            Public Overridable Property Before As Date?
            Public Overridable Property After As Date?
            Public Overridable Property Channel As String
            Public Overridable Property Iterator As String
            Public Overridable Property Limit As Integer?
            Public Overridable Property Order As Ordering?
            Public Overridable Property EventTypes As List(Of String)
            Public Overridable Property WithContent As Boolean?
        End Class

        Public Partial Class ListMessagesResponseDto
            Public Overridable Property Data As GetMessageResponseDto() = New GetMessageResponseDto(){}
            Public Overridable Property Done As Boolean
            Public Overridable Property Iterator As String
        End Class

        Public Enum Ordering
            <EnumMember(Value:="ascending")>
            Ascending = 1
            <EnumMember(Value:="descending")>
            Descending = 2
        End Enum
    End Namespace
End Namespace

VB.NET ListWebhookMessages DTOs

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

HTTP + JSV

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

GET /webhook/messages HTTP/1.1 
Host: api.bookmore.com 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Data: 
	[
		{
			Id: String,
			Channels: 
			[
				String
			],
			EventType: String,
			Metadata: 
			{
				String: String
			},
			Payload: {},
			EventId: String
		}
	],
	Done: False,
	Iterator: String
}