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
import java.math.*
import java.util.*
import net.servicestack.client.*


@ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
@ValidateRequest(Validator="IsAuthenticated")
open class ListWebhookMessages : ListMessagesRequestDto(), ICompany
{
    /**
    * The company id, if empty will use the company id for the user you are logged in with.
    */
    @ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.", IsRequired=true, ParameterType="query")
    var CompanyId:UUID? = null
}

open class ListMessagesRequestDto : ClientWebhookRequestBase()
{
    var Before:Date? = null
    var After:Date? = null
    var Channel:String? = null
    var Iterator:String? = null
    var Limit:Int? = null
    var Order:Ordering? = null
    var EventTypes:ArrayList<String> = ArrayList<String>()
    var WithContent:Boolean? = null
}

open class ClientWebhookRequestBase
{
    var ClientId:UUID? = null
}

enum class Ordering(val value:Int)
{
    Ascending(1),
    Descending(2),
}

open class ListMessagesResponseDto
{
    var Data:ArrayList<GetMessageResponseDto>? = null
    var Done:Boolean? = null
    var Iterator:String? = null
}

open class GetMessageResponseDto
{
    var Id:String? = null
    var Channels:ArrayList<String> = ArrayList<String>()
    var EventType:String? = null
    var Metadata:HashMap<String,String> = HashMap<String,String>()
    var Payload:Object? = null
    var EventId:String? = null
    var Timestamp:Date? = null
}

Kotlin ListWebhookMessages DTOs

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

HTTP + CSV

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.bokamera.se 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

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