BokaMera.API.Host

<back to all web services

CreateBooking

The following routes are available for this service:
POST/bookingsCreate a new bookingCreate a new booking if you are authorized to do so.
import Foundation
import ServiceStack

// @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
public class CreateBooking : CreateBookingBase, IInterval
{
    /**
    * The datetime you want to start the booking.
    */
    // @ApiMember(Description="The datetime you want to start the booking.", IsRequired=true)
    public var from:Date

    /**
    * The datetime you want to end the booking.
    */
    // @ApiMember(Description="The datetime you want to end the booking.", IsRequired=true)
    public var to:Date

    /**
    * Set the number of spots you want to book. You add number of spots per price category. Multiple spots require that the service has GroupBooking enabled. Default is one spot.
    */
    // @ApiMember(Description="Set the number of spots you want to book. You add number of spots per price category. Multiple spots require that the service has GroupBooking enabled. Default is one spot.")
    public var quantities:[QuantityToBook] = []

    required public init(){ super.init() }

    private enum CodingKeys : String, CodingKey {
        case from
        case to
        case quantities
    }

    required public init(from decoder: Decoder) throws {
        try super.init(from: decoder)
        let container = try decoder.container(keyedBy: CodingKeys.self)
        from = try container.decodeIfPresent(Date.self, forKey: .from)
        to = try container.decodeIfPresent(Date.self, forKey: .to)
        quantities = try container.decodeIfPresent([QuantityToBook].self, forKey: .quantities) ?? []
    }

    public override func encode(to encoder: Encoder) throws {
        try super.encode(to: encoder)
        var container = encoder.container(keyedBy: CodingKeys.self)
        if from != nil { try container.encode(from, forKey: .from) }
        if to != nil { try container.encode(to, forKey: .to) }
        if quantities.count > 0 { try container.encode(quantities, forKey: .quantities) }
    }
}

public class CreateBookingBase : Codable
{
    /**
    * 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.")
    public var companyId:String?

    /**
    * If you want to book on an existing customer instead of CustomerToBook info set the CustomerId here. Set Empty Guid (00000000-0000-0000-0000-000000000000) if you want to book without any customer, this is only allowed by admin. The customer id is shown in the customer list named as id. When booking as customer (no admin) leave this field blank.
    */
    // @ApiMember(Description="If you want to book on an existing customer instead of CustomerToBook info set the CustomerId here. Set Empty Guid (00000000-0000-0000-0000-000000000000) if you want to book without any customer, this is only allowed by admin. The customer id is shown in the customer list named as id. When booking as customer (no admin) leave this field blank.")
    public var customerId:String?

    /**
    * If company requires to be authenticated or a pin code entered to book on a specific customer, enter it here.
    */
    // @ApiMember(Description="If company requires to be authenticated or a pin code entered to book on a specific customer, enter it here.")
    public var pinCode:String

    /**
    * If you want to book with customer information instead of the Customer Id send the customer information here. Note: If customer profile already exists with the same email the information will not be changed, instead the provided information will be added as BookingsComments if it differs from the ordinairy profile. 
    */
    // @ApiMember(Description="If you want to book with customer information instead of the Customer Id send the customer information here. Note: If customer profile already exists with the same email the information will not be changed, instead the provided information will be added as BookingsComments if it differs from the ordinairy profile. ")
    public var customer:CustomerToBook

    /**
    * The service to be booked
    */
    // @ApiMember(Description="The service to be booked", IsRequired=true)
    public var serviceId:Int

    /**
    * If you want to add comments to a booking you can add them here, this comments are never shared with the customer
    */
    // @ApiMember(Description="If you want to add comments to a booking you can add them here, this comments are never shared with the customer")
    public var bookedComments:String

    /**
    * If you want to add comments to the booking that is sent to the customer, you can add them here. Comments will be sent in the booking confirmation
    */
    // @ApiMember(Description="If you want to add comments to the booking that is sent to the customer, you can add them here. Comments will be sent in the booking confirmation")
    public var commentsToCustomer:String

    public var resources:[ResourceToBook] = []
    /**
    * Rebate code ids as an array of integer
    */
    // @ApiMember(Description="Rebate code ids as an array of integer")
    public var rebateCodeIds:[Int] = []

    /**
    * If you want to send Email reminder
    */
    // @ApiMember(Description="If you want to send Email reminder")
    public var sendEmailReminder:Bool?

    /**
    * If you want to send SMS reminder
    */
    // @ApiMember(Description="If you want to send SMS reminder")
    public var sendSmsReminder:Bool?

    /**
    * If you want to send SMS confirmation
    */
    // @ApiMember(Description="If you want to send SMS confirmation")
    public var sendSmsConfirmation:Bool?

    /**
    * Only admins are allowed to not send an email confirmation. Default is true
    */
    // @ApiMember(Description="Only admins are allowed to not send an email confirmation. Default is true")
    public var sendEmailConfirmation:Bool?

    /**
    * If payment is enabled and you're an administrator, optional to choose payment option, if empty then the default settings will be used. Following payment options exists. DefaultSetting = 0, BookWithoutPayment = 1 (will be direcyly booked without payment), BookWithPaymentMessageToCustomer = 2 (will set status AwaitingPayment and send payment instructions to customer), BookWithManualPayment = 3 (Will set status AwaitingPaymentNoTimeLimit and Admin will need to manually mark the booking as payed when recieved payment).
    */
    // @ApiMember(Description="If payment is enabled and you're an administrator, optional to choose payment option, if empty then the default settings will be used. Following payment options exists. DefaultSetting = 0, BookWithoutPayment = 1 (will be direcyly booked without payment), BookWithPaymentMessageToCustomer = 2 (will set status AwaitingPayment and send payment instructions to customer), BookWithManualPayment = 3 (Will set status AwaitingPaymentNoTimeLimit and Admin will need to manually mark the booking as payed when recieved payment).")
    public var paymentOption:PaymentOptions

    /**
    * If Custom Fields are added to the booking, here you will send the id and the value for each custom field to be saved
    */
    // @ApiMember(Description="If Custom Fields are added to the booking, here you will send the id and the value for each custom field to be saved")
    public var customFields:[AddCustomField] = []

    /**
    * If Custom Fields are added to the customer, here you will send the id and the value for each custom field to be updated
    */
    // @ApiMember(Description="If Custom Fields are added to the customer, here you will send the id and the value for each custom field to be updated")
    public var customerCustomFields:[AddCustomField] = []

    /**
    * If want to allow to book outside the service schedules. This means you can book a time after the schedule opening hours as long as the resource are available. This is only allowed by administrators
    */
    // @ApiMember(Description="If want to allow to book outside the service schedules. This means you can book a time after the schedule opening hours as long as the resource are available. This is only allowed by administrators")
    public var allowBookingOutsideSchedules:Bool

    required public init(){}
}

public class CustomerToBook : Codable
{
    /**
    * Customers firstname
    */
    // @ApiMember(Description="Customers firstname", IsRequired=true)
    public var firstname:String

    /**
    * Customers lastname
    */
    // @ApiMember(Description="Customers lastname", IsRequired=true)
    public var lastname:String

    /**
    * Customers email
    */
    // @ApiMember(Description="Customers email", IsRequired=true)
    public var email:String

    /**
    * Customers phone number. Mobile phone number is required for SMS messages to be sent.
    */
    // @ApiMember(Description="Customers phone number. Mobile phone number is required for SMS messages to be sent.", IsRequired=true)
    public var phone:String

    required public init(){}
}

public class ResourceToBook : Codable
{
    public var resourceTypeId:Int
    public var resourceId:Int

    required public init(){}
}

public enum PaymentOptions : String, Codable
{
    case DefaultSetting
    case BookWithoutPayment
    case BookWithPaymentMessageToCustomer
    case BookWithManualPayment
}

public class AddCustomField : Codable
{
    public var id:Int
    public var value:String

    required public init(){}
}

public class QuantityToBook : Codable
{
    /**
    * If service has a price, enter the price id for that price. If no price exists for the service set 0 as PriceId. If you put 0 and a price exists, it will use that price (only works if just one price exists for the current selected date to book)
    */
    // @ApiMember(Description="If service has a price, enter the price id for that price. If no price exists for the service set 0 as PriceId. If you put 0 and a price exists, it will use that price (only works if just one price exists for the current selected date to book)", IsRequired=true)
    public var priceId:Int

    /**
    * Set the number of spots or resources you want to book on the specific price category
    */
    // @ApiMember(Description="Set the number of spots or resources you want to book on the specific price category", IsRequired=true)
    public var quantity:Int

    /**
    * If the quantity you add should occupy a spot. Default is true. If no it will only be a row that includes price information.
    */
    // @ApiMember(Description="If the quantity you add should occupy a spot. Default is true. If no it will only be a row that includes price information.")
    public var occupiesSpot:Bool

    required public init(){}
}

public class BookingQueryResponse : Codable
{
    public var id:Int
    public var companyId:String
    public var from:Date
    public var to:Date
    public var status:BookingStatusEnum
    public var statusId:Int
    public var statusName:String
    public var statusInfo:BookingStatusQueryResponse
    public var sendEmailReminder:Bool
    public var sendSmsReminder:Bool
    public var sendSmsConfirmation:Bool
    public var sendEmailConfirmation:Bool
    public var lastTimeToUnBook:Date?
    public var customFields:[CustomFieldConfigData] = []
    public var customFieldValues:[CustomFieldDataResponse] = []
    public var bookedResourceTypes:[BookedResourceType] = []
    public var company:BookedCompany
    public var customer:BookedCustomer
    public var quantities:[BookedQuantity] = []
    public var service:ServiceInfoResponse
    public var paymentExpiration:Date?
    public var log:[BookingLogQueryResponse] = []
    public var paymentLog:[BookingPaymentLogQueryResponse] = []
    public var checkoutLog:[BookingCheckoutQueryResponse] = []
    public var externalReference:[ExternalReferenceResponse] = []
    public var responseStatus:ResponseStatus
    public var calendarExportStatus:BookingCalendarExportStatus
    public var lengthInMinutes:Int?
    public var bookedBy:String
    public var bookedComments:String
    public var unbookedComments:String
    public var commentsToCustomer:String
    public var createdDate:Date
    public var updatedDate:Date
    public var unbookedOn:Date?
    public var cancellationCode:String
    public var ratingCode:String

    required public init(){}
}

public enum BookingStatusEnum : Int, Codable
{
    case Booked = 1
    case Unbooked = 2
    case Reserved = 3
    case Canceled = 4
    case AwaitingPayment = 5
    case AwaitingPaymentNoTimeLimit = 6
    case Payed = 7
    case AwaitingPaymentRequestFromAdmin = 8
    case AwaitingPaymentFromProvider = 9
    case Invoiced = 10
}

public class BookingStatusQueryResponse : Codable
{
    public var id:Int
    public var name:String
    public var Description:String
    public var icon:String
    public var color:String

    required public init(){}
}

public class CustomFieldConfigData : Codable
{
    /**
    * Custom field id
    */
    // @ApiMember(Description="Custom field id")
    public var id:Int

    /**
    * Configuration name. Example: 'Number of persons'.
    */
    // @ApiMember(Description="Configuration name. Example: 'Number of persons'.")
    public var name:String

    /**
    * Custom field description. Example: 'For how many persons is this booking?'
    */
    // @ApiMember(Description="Custom field description. Example: 'For how many persons is this booking?'")
    public var Description:String

    /**
    * Field width. Example: 20 for 20px
    */
    // @ApiMember(Description="Field width. Example: 20 for 20px")
    public var width:Int?

    /**
    * Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox'
    */
    // @ApiMember(Description="Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox'")
    public var dataType:String

    /**
    * Default value of the field. Example: '3'
    */
    // @ApiMember(Description="Default value of the field. Example: '3'")
    public var defaultValue:String

    /**
    * Determines if the field is required to have a value or not
    */
    // @ApiMember(Description="Determines if the field is required to have a value or not")
    public var isMandatory:Bool

    /**
    * Error message shown to the user if the field data is required but not entered
    */
    // @ApiMember(Description="Error message shown to the user if the field data is required but not entered")
    public var mandatoryErrorMessage:String

    /**
    * Max lenght of the field
    */
    // @ApiMember(Description="Max lenght of the field")
    public var maxLength:Int

    /**
    * If the field should have multiple lines
    */
    // @ApiMember(Description="If the field should have multiple lines")
    public var multipleLineText:Bool

    /**
    * Regular expression used for validation of the field
    */
    // @ApiMember(Description="Regular expression used for validation of the field")
    public var regEx:String

    /**
    * Error message shown if the regular expression validation failed
    */
    // @ApiMember(Description="Error message shown if the regular expression validation failed")
    public var regExErrorMessage:String

    /**
    * The values to select from if Datatype is DropDown for this custom field
    */
    // @ApiMember(Description="The values to select from if Datatype is DropDown for this custom field")
    public var values:[CustomFieldValueResponse] = []

    required public init(){}
}

public class CustomFieldValueResponse : Codable
{
    public var value:String

    required public init(){}
}

public class CustomFieldDataResponse : Codable
{
    public var id:Int
    public var column:String
    public var name:String
    public var Description:String
    public var value:String
    /**
    * Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox'
    */
    // @ApiMember(Description="Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox'")
    public var dataType:String

    required public init(){}
}

public class BookedResourceType : Codable
{
    /**
    * The resource type id
    */
    // @ApiMember(Description="The resource type id")
    public var id:Int

    /**
    * The resource type name
    */
    // @ApiMember(Description="The resource type name")
    public var name:String

    /**
    * The resources inside resource type
    */
    // @ApiMember(Description="The resources inside resource type")
    public var resources:[BookedResource] = []

    required public init(){}
}

public class BookedResource : Codable
{
    public var id:Int
    public var name:String
    public var color:String
    public var imageUrl:Uri
    public var email:String
    public var mobilePhone:String
    public var accessGroup:String
    public var emailNotification:Bool
    public var smsNotification:Bool
    public var emailReminder:Bool
    public var smsReminder:Bool

    required public init(){}
}

public class BookedCompany : Codable
{
    public var id:String
    public var name:String
    public var logoType:Uri
    public var category:String
    public var street1:String
    public var street2:String
    public var zipCode:String
    public var city:String
    public var countryId:String
    public var longitude:String
    public var latitude:String
    public var phone:String
    public var email:String
    public var homePage:String
    public var sitePath:String
    public var isFavorite:Bool
    public var paymentProviderId:Int?

    required public init(){}
}

public class BookedCustomer : Codable
{
    public var id:String
    public var firstname:String
    public var lastname:String
    public var email:String
    public var phone:String
    public var facebookUserName:String
    public var imageUrl:String
    public var corporateIdentityNumber:String
    public var invoiceAddress1:String
    public var invoiceAddress2:String
    public var invoiceCity:String
    public var invoicePostalCode:String
    public var invoiceCountryCode:String

    required public init(){}
}

public class BookedQuantity : Codable
{
    /**
    * The quantity Id
    */
    // @ApiMember(Description="The quantity Id")
    public var id:Int

    /**
    * The quantity for booked on this price category
    */
    // @ApiMember(Description="The quantity for booked on this price category")
    public var quantity:Int

    /**
    * The price
    */
    // @ApiMember(Description="The price")
    public var price:Double?

    /**
    * The price bofore rebate codes
    */
    // @ApiMember(Description="The price bofore rebate codes")
    public var priceBeforeRebate:Double?

    /**
    * The price currency
    */
    // @ApiMember(Description="The price currency")
    public var currencyId:String

    /**
    * The price sign
    */
    // @ApiMember(Description="The price sign")
    public var priceSign:String

    /**
    * The price category
    */
    // @ApiMember(Description="The price category")
    public var category:String

    /**
    * The price VAT in percent
    */
    // @ApiMember(Description="The price VAT in percent")
    public var vat:Double?

    /**
    * The price text to display
    */
    // @ApiMember(Description="The price text to display")
    public var priceText:String

    /**
    * If the quantity you add should occupy a spot. Default is true. If no it will only be a row that includes price information.
    */
    // @ApiMember(Description="If the quantity you add should occupy a spot. Default is true. If no it will only be a row that includes price information.")
    public var occupiesSpot:Bool

    required public init(){}
}

public class ServiceInfoResponse : Codable
{
    public var id:Int
    public var name:String
    public var Description:String
    public var imageUrl:Uri
    public var lengthInMinutes:Int?
    public var maxNumberOfSpotsPerBooking:Int
    public var groupBooking:GroupBookingSettings
    public var multipleResource:MultipleResourceSettings
    public var isGroupBooking:Bool
    public var isPaymentEnabled:Bool

    required public init(){}
}

public class GroupBookingSettings : Codable
{
    public var active:Bool
    public var min:Int
    public var max:Int

    required public init(){}
}

public class MultipleResourceSettings : Codable
{
    public var active:Bool
    public var min:Int
    public var max:Int

    required public init(){}
}

public class BookingLogQueryResponse : Codable
{
    /**
    * The booking log id
    */
    // @ApiMember(Description="The booking log id")
    public var id:Int

    /**
    * The booking id
    */
    // @ApiMember(Description="The booking id")
    public var bookingId:Int

    /**
    * The type of event
    */
    // @ApiMember(Description="The type of event")
    public var eventTypeId:Int

    /**
    * The type of event
    */
    // @ApiMember(Description="The type of event")
    public var eventType:BookingLogEventTypeResponse

    /**
    * Comments that could be added to the event log item
    */
    // @ApiMember(Description="Comments that could be added to the event log item")
    public var comments:String

    /**
    * The user created the event
    */
    // @ApiMember(Description="The user created the event")
    public var userName:String

    /**
    * Then date when the event occured
    */
    // @ApiMember(Description="Then date when the event occured")
    public var created:Date

    required public init(){}
}

public class BookingLogEventTypeResponse : Codable
{
    /**
    * The event type id
    */
    // @ApiMember(Description="The event type id")
    public var id:Int

    /**
    * The event type name
    */
    // @ApiMember(Description="The event type name")
    public var name:String

    /**
    * The event type description
    */
    // @ApiMember(Description="The event type description")
    public var Description:String

    required public init(){}
}

public class BookingPaymentLogQueryResponse : Codable
{
    /**
    * The booking payment log id
    */
    // @ApiMember(Description="The booking payment log id")
    public var id:Int

    /**
    * The booking id
    */
    // @ApiMember(Description="The booking id")
    public var bookingId:Int

    /**
    * The payment reference id
    */
    // @ApiMember(Description="The payment reference id")
    public var paymentReferenceId:String

    /**
    * The payment order item reference id
    */
    // @ApiMember(Description="The payment order item reference id")
    public var orderItemReferenceId:String

    /**
    * The payment reference id
    */
    // @ApiMember(Description="The payment reference id")
    public var paymentProviderId:Int?

    /**
    * The payment amount
    */
    // @ApiMember(Description="The payment amount")
    public var amount:Double

    /**
    * The payment VAT in percent
    */
    // @ApiMember(Description="The payment VAT in percent")
    public var vat:Double

    /**
    * The payment amount that is credited
    */
    // @ApiMember(Description="The payment amount that is credited")
    public var amountCredited:Double

    /**
    * The payment currency id
    */
    // @ApiMember(Description="The payment currency id")
    public var currencyId:String

    /**
    * The payment currency info
    */
    // @ApiMember(Description="The payment currency info")
    public var currencyInfo:CurrencyInfoResponse

    /**
    * Comments that could be added to the event log item
    */
    // @ApiMember(Description="Comments that could be added to the event log item")
    public var comments:String

    /**
    * The date when the payment items was created
    */
    // @ApiMember(Description="The date when the payment items was created")
    public var created:Date

    /**
    * The date when the payment items was update
    */
    // @ApiMember(Description="The date when the payment items was update")
    public var updated:Date

    required public init(){}
}

public class CurrencyInfoResponse : Codable
{
    /**
    * The currency id
    */
    // @ApiMember(Description="The currency id")
    public var id:String

    /**
    * The currency id
    */
    // @ApiMember(Description="The currency id")
    public var name:String

    /**
    * The currency id
    */
    // @ApiMember(Description="The currency id")
    public var currencySign:String

    required public init(){}
}

public class BookingCheckoutQueryResponse : Codable
{
    /**
    * The checkout id
    */
    // @ApiMember(Description="The checkout id")
    public var id:String

    /**
    * The booking id
    */
    // @ApiMember(Description="The booking id")
    public var bookingId:Int

    /**
    * The purchase id
    */
    // @ApiMember(Description="The purchase id")
    public var purchaseId:Int?

    /**
    * The payment checkout expiration datetime
    */
    // @ApiMember(Description="The payment checkout expiration datetime")
    public var expirationTime:Date?

    /**
    * The payment snippet code
    */
    // @ApiMember(Description="The payment snippet code")
    public var snippet:String

    /**
    * The payment status
    */
    // @ApiMember(Description="The payment status")
    public var status:String

    /**
    * Log message
    */
    // @ApiMember(Description="Log message")
    public var message:String

    /**
    * When the checkout log item was created
    */
    // @ApiMember(Description="When the checkout log item was created")
    public var created:Date

    /**
    * When the checkout log item was updated
    */
    // @ApiMember(Description="When the checkout log item was updated")
    public var updated:Date

    required public init(){}
}

public class ExternalReferenceResponse : Codable
{
    public var companyId:String
    public var id:String
    public var ownerId:String
    public var referenceType:String
    public var externalData:String
    public var createdBy:String
    public var updated:Date
    public var created:Date

    required public init(){}
}

public class BookingCalendarExportStatus : Codable
{
    public var calendarId:String
    public var bookingId:Int
    public var synced:Bool?

    required public init(){}
}


Swift CreateBooking 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.

POST /bookings HTTP/1.1 
Host: testapi.bokamera.se 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	Quantities: 
	[
		{
			PriceId: 0,
			Quantity: 0,
			OccupiesSpot: False
		}
	],
	CompanyId: 00000000-0000-0000-0000-000000000000,
	CustomerId: 00000000-0000-0000-0000-000000000000,
	PinCode: String,
	Customer: 
	{
		Firstname: String,
		Lastname: String,
		Email: String,
		Phone: String
	},
	ServiceId: 0,
	BookedComments: String,
	CommentsToCustomer: String,
	Resources: 
	[
		{
			ResourceTypeId: 0,
			ResourceId: 0
		}
	],
	RebateCodeIds: 
	[
		0
	],
	SendEmailReminder: False,
	SendSmsReminder: False,
	SendSmsConfirmation: False,
	SendEmailConfirmation: False,
	PaymentOption: DefaultSetting,
	CustomFields: 
	[
		{
			Id: 0,
			Value: String
		}
	],
	CustomerCustomFields: 
	[
		{
			Id: 0,
			Value: String
		}
	],
	AllowBookingOutsideSchedules: False
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Id: 0,
	Status: Booked,
	StatusId: 0,
	StatusName: String,
	StatusInfo: 
	{
		Id: 0,
		Name: String,
		Description: String,
		Icon: String,
		Color: String
	},
	SendEmailReminder: False,
	SendSmsReminder: False,
	SendSmsConfirmation: False,
	SendEmailConfirmation: False,
	LastTimeToUnBook: "0001-01-01T00:00:00",
	CustomFields: 
	[
		{
			"Id": 0,
			"Name": "String",
			"Description": "String",
			"Width": 0,
			"DataType": "String",
			"DefaultValue": "String",
			"IsMandatory": false,
			"MandatoryErrorMessage": "String",
			"MaxLength": 0,
			"MultipleLineText": false,
			"RegEx": "String",
			"RegExErrorMessage": "String",
			"Values": 
			[
				{
					"Value": "String"
				}
			]
		}
	],
	CustomFieldValues: 
	[
		{
			Id: 0,
			Column: String,
			Name: String,
			Description: String,
			Value: String,
			DataType: String
		}
	],
	BookedResourceTypes: 
	[
		{
			Id: 0,
			Name: String,
			Resources: 
			[
				{
					Id: 0,
					Name: String,
					Color: String,
					Email: String,
					MobilePhone: String,
					AccessGroup: String,
					EmailNotification: False,
					SMSNotification: False,
					EmailReminder: False,
					SMSReminder: 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,
		IsFavorite: False,
		PaymentProviderId: 0
	},
	Customer: 
	{
		Firstname: String,
		Lastname: String,
		Email: String,
		Phone: String,
		FacebookUserName: String,
		ImageUrl: String,
		CorporateIdentityNumber: String,
		InvoiceAddress1: String,
		InvoiceAddress2: String,
		InvoiceCity: String,
		InvoicePostalCode: String,
		InvoiceCountryCode: String
	},
	Quantities: 
	[
		{
			Id: 0,
			Quantity: 0,
			Price: 0,
			PriceBeforeRebate: 0,
			CurrencyId: String,
			PriceSign: String,
			Category: String,
			VAT: 0,
			PriceText: String,
			OccupiesSpot: False
		}
	],
	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
	},
	PaymentExpiration: "0001-01-01T00:00:00",
	Log: 
	[
		{
			Id: 0,
			BookingId: 0,
			EventTypeId: 0,
			EventType: 
			{
				Id: 0,
				Name: String,
				Description: String
			},
			Comments: String,
			UserName: String
		}
	],
	PaymentLog: 
	[
		{
			Id: 0,
			BookingId: 0,
			PaymentReferenceId: String,
			OrderItemReferenceId: String,
			PaymentProviderId: 0,
			Amount: 0,
			VAT: 0,
			AmountCredited: 0,
			CurrencyId: String,
			CurrencyInfo: 
			{
				Id: String,
				Name: String,
				CurrencySign: String
			},
			Comments: String
		}
	],
	CheckoutLog: 
	[
		{
			BookingId: 0,
			PurchaseId: 0,
			ExpirationTime: "0001-01-01T00:00:00",
			Snippet: String,
			Status: String,
			Message: String
		}
	],
	ExternalReference: 
	[
		{
			ReferenceType: String,
			ExternalData: String,
			CreatedBy: String
		}
	],
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	},
	CalendarExportStatus: 
	{
		CalendarId: String,
		BookingId: 0,
		Synced: False
	},
	LengthInMinutes: 0,
	BookedBy: String,
	BookedComments: String,
	UnbookedComments: String,
	CommentsToCustomer: String,
	UnbookedOn: "0001-01-01T00:00:00",
	CancellationCode: String,
	RatingCode: String
}