BokaMera.API.Host

<back to all web services

TagQuery

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
GET/tagsGet tags for the companyReturns tags for the current company, optionally filtered by scope and active status.
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 BokaMera.API.ServiceModel.Enums

Namespace Global

    Namespace BokaMera.API.ServiceModel.Dtos

        Public Partial Class AccessKeyTypeResponse
            Public Overridable Property Id As Integer
            Public Overridable Property KeyType As String
            Public Overridable Property Description As String
        End Class

        <ApiResponse(Description:="You were unauthorized to call this service", StatusCode:=401)>
        <ValidateRequest(Validator:="IsAuthenticated")>
        Public Partial Class TagQuery
            '''<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.")>
            Public Overridable Property CompanyId As Guid?

            '''<Summary>
            '''Filter by tag scope. 0 = Booking, 1 = Customer.
            '''</Summary>
            <ApiMember(Description:="Filter by tag scope. 0 = Booking, 1 = Customer.")>
            Public Overridable Property Scope As TagScope?

            '''<Summary>
            '''Filter by active status. If not provided, only active tags are returned.
            '''</Summary>
            <ApiMember(Description:="Filter by active status. If not provided, only active tags are returned.")>
            Public Overridable Property Active As Boolean?

            '''<Summary>
            '''Number of records to skip
            '''</Summary>
            <ApiMember(Description:="Number of records to skip")>
            Public Overridable Property Skip As Integer?

            '''<Summary>
            '''Number of records to take
            '''</Summary>
            <ApiMember(Description:="Number of records to take")>
            Public Overridable Property Take As Integer?

            '''<Summary>
            '''Sort field
            '''</Summary>
            <ApiMember(Description:="Sort field")>
            Public Overridable Property OrderBy As String
        End Class
    End Namespace

    Namespace BokaMera.API.ServiceModel.Enums

        Public Enum TagScope
            Booking
            Customer
        End Enum
    End Namespace

    Namespace ServiceStack

        <DataContract>
        Public Partial Class QueryResponse(Of T)
            <DataMember(Order:=1)>
            Public Overridable Property Offset As Integer

            <DataMember(Order:=2)>
            Public Overridable Property Total As Integer

            <DataMember(Order:=3)>
            Public Overridable Property Results As List(Of AccessKeyTypeResponse) = New List(Of AccessKeyTypeResponse)

            <DataMember(Order:=4)>
            Public Overridable Property Meta As Dictionary(Of String, String)

            <DataMember(Order:=5)>
            Public Overridable Property ResponseStatus As ResponseStatus
        End Class
    End Namespace
End Namespace

VB.NET TagQuery 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 /tags HTTP/1.1 
Host: api.bookmore.com 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Offset: 0,
	Total: 0,
	Results: 
	[
		{
			Id: 0,
			Name: String,
			Scope: 0,
			Color: String,
			SortOrder: 0,
			Active: False,
			ResponseStatus: 
			{
				ErrorCode: String,
				Message: String,
				StackTrace: String,
				Errors: 
				[
					{
						ErrorCode: String,
						FieldName: String,
						Message: String,
						Meta: 
						{
							String: String
						}
					}
				],
				Meta: 
				{
					String: String
				}
			}
		}
	],
	Meta: 
	{
		String: String
	},
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}