BokaMera.API.Host

<back to all web services

GetAllBookingQueueForAdmin

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin, bookingsupplier-administrator-read
The following routes are available for this service:
GET/bookinguserqueue/companyGet all queue items for company
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class BookingUserQueuePriceResponse:
    company_id: Optional[str] = None
    id: int = 0
    booking_user_queue_id: int = 0
    service_price_id: Optional[int] = None
    quantity: Optional[int] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GroupBookingSettings:
    active: bool = False
    min: int = 0
    max: int = 0


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class MultipleResourceSettings:
    active: bool = False
    min: int = 0
    max: int = 0


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ServiceInfoResponse:
    id: int = 0
    name: Optional[str] = None
    description: Optional[str] = None
    image_url: Optional[str] = None
    length_in_minutes: Optional[int] = None
    max_number_of_spots_per_booking: int = 0
    group_booking: Optional[GroupBookingSettings] = None
    multiple_resource: Optional[MultipleResourceSettings] = None
    is_group_booking: bool = False
    is_payment_enabled: bool = False


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CompanyInfoResponse:
    id: Optional[str] = None
    name: Optional[str] = None
    logo_type: Optional[str] = None
    category: Optional[str] = None
    street1: Optional[str] = None
    street2: Optional[str] = None
    zip_code: Optional[str] = None
    city: Optional[str] = None
    country_id: Optional[str] = None
    longitude: Optional[str] = None
    latitude: Optional[str] = None
    phone: Optional[str] = None
    email: Optional[str] = None
    home_page: Optional[str] = None
    site_path: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class BookingUserQueueItemResponse:
    booking_user_queue_id: int = 0
    company_id: Optional[str] = None
    customer_id: Optional[str] = None
    service_id: int = 0
    from_: datetime.datetime = field(metadata=config(field_name='from'), default=datetime.datetime(1, 1, 1))
    to: datetime.datetime = datetime.datetime(1, 1, 1)
    status_code: int = 0
    status_name: Optional[str] = None
    send_confirmation_time: Optional[datetime.datetime] = None
    quantities: Optional[List[BookingUserQueuePriceResponse]] = None
    service: Optional[ServiceInfoResponse] = None
    company: Optional[CompanyInfoResponse] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetAllBookingQueueForUserResponse:
    booking_user_queue_response_list: Optional[List[BookingUserQueueItemResponse]] = None
    response_status: Optional[ResponseStatus] = None


# @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
# @ValidateRequest(Validator="IsAuthenticated")
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetAllBookingQueueForAdmin:
    company_id: Optional[str] = None
    service_id: int = 0
    date_start: Optional[datetime.datetime] = None
    date_end: Optional[datetime.datetime] = None

Python GetAllBookingQueueForAdmin 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 /bookinguserqueue/company HTTP/1.1 
Host: api.bokamera.se 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	BookingUserQueueResponseList: 
	[
		{
			BookingUserQueueId: 0,
			ServiceId: 0,
			StatusCode: 0,
			StatusName: String,
			SendConfirmationTime: "0001-01-01T00:00:00",
			Quantities: 
			[
				{
					Id: 0,
					BookingUserQueueId: 0,
					ServicePriceId: 0,
					Quantity: 0
				}
			],
			Service: 
			{
				Id: 0,
				Name: String,
				Description: String,
				LengthInMinutes: 0,
				MaxNumberOfSpotsPerBooking: 0,
				GroupBooking: 
				{
					Active: False,
					Min: 0,
					Max: 0
				},
				MultipleResource: 
				{
					Active: False,
					Min: 0,
					Max: 0
				},
				IsGroupBooking: False,
				IsPaymentEnabled: False
			},
			Company: 
			{
				Name: String,
				Category: String,
				Street1: String,
				Street2: String,
				ZipCode: String,
				City: String,
				CountryId: String,
				Longitude: String,
				Latitude: String,
				Phone: String,
				Email: String,
				HomePage: String,
				SitePath: String
			}
		}
	],
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}