POST | /bookings/repeat | Create new bookings | Create new bookings if you are authorized to do so. |
---|
namespace BokaMera.API.ServiceModel.Dtos
open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
type BookingStatusEnum =
| Booked = 1
| Unbooked = 2
| Reserved = 3
| Canceled = 4
| AwaitingPayment = 5
| AwaitingPaymentNoTimeLimit = 6
| Payed = 7
| AwaitingPaymentRequestFromAdmin = 8
| AwaitingPaymentFromProvider = 9
| Invoiced = 10
[<AllowNullLiteral>]
type BookingStatusQueryResponse() =
member val Id:Int32 = new Int32() with get,set
member val Name:String = null with get,set
member val Description:String = null with get,set
member val Icon:String = null with get,set
member val Color:String = null with get,set
[<AllowNullLiteral>]
type CustomFieldValueResponse() =
member val Value:String = null with get,set
[<AllowNullLiteral>]
type CustomFieldConfigData() =
///<summary>
///Custom field id
///</summary>
[<ApiMember(Description="Custom field id")>]
member val Id:Int32 = new Int32() with get,set
///<summary>
///Configuration name. Example: 'Number of persons'.
///</summary>
[<ApiMember(Description="Configuration name. Example: 'Number of persons'.")>]
member val Name:String = null with get,set
///<summary>
///Custom field description. Example: 'For how many persons is this booking?'
///</summary>
[<ApiMember(Description="Custom field description. Example: 'For how many persons is this booking?'")>]
member val Description:String = null with get,set
///<summary>
///Field width. Example: 20 for 20px
///</summary>
[<ApiMember(Description="Field width. Example: 20 for 20px")>]
member val Width:Nullable<Int32> = new Nullable<Int32>() with get,set
///<summary>
///Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox'
///</summary>
[<ApiMember(Description="Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox'")>]
member val DataType:String = null with get,set
///<summary>
///Default value of the field. Example: '3'
///</summary>
[<ApiMember(Description="Default value of the field. Example: '3'")>]
member val DefaultValue:String = null with get,set
///<summary>
///Determines if the field is required to have a value or not
///</summary>
[<ApiMember(Description="Determines if the field is required to have a value or not")>]
member val IsMandatory:Boolean = new Boolean() with get,set
///<summary>
///Error message shown to the user if the field data is required but not entered
///</summary>
[<ApiMember(Description="Error message shown to the user if the field data is required but not entered")>]
member val MandatoryErrorMessage:String = null with get,set
///<summary>
///Max lenght of the field
///</summary>
[<ApiMember(Description="Max lenght of the field")>]
member val MaxLength:Int32 = new Int32() with get,set
///<summary>
///If the field should have multiple lines
///</summary>
[<ApiMember(Description="If the field should have multiple lines")>]
member val MultipleLineText:Boolean = new Boolean() with get,set
///<summary>
///Regular expression used for validation of the field
///</summary>
[<ApiMember(Description="Regular expression used for validation of the field")>]
member val RegEx:String = null with get,set
///<summary>
///Error message shown if the regular expression validation failed
///</summary>
[<ApiMember(Description="Error message shown if the regular expression validation failed")>]
member val RegExErrorMessage:String = null with get,set
///<summary>
///The values to select from if Datatype is DropDown for this custom field
///</summary>
[<ApiMember(Description="The values to select from if Datatype is DropDown for this custom field")>]
member val Values:ResizeArray<CustomFieldValueResponse> = new ResizeArray<CustomFieldValueResponse>() with get,set
[<AllowNullLiteral>]
type CustomFieldDataResponse() =
member val Id:Int32 = new Int32() with get,set
member val Column:String = null with get,set
member val Name:String = null with get,set
member val Description:String = null with get,set
member val Value:String = null with get,set
///<summary>
///Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox'
///</summary>
[<ApiMember(Description="Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox'")>]
member val DataType:String = null with get,set
[<AllowNullLiteral>]
type BookedResource() =
member val Id:Int32 = new Int32() with get,set
member val Name:String = null with get,set
member val Color:String = null with get,set
member val ImageUrl:Uri = null with get,set
member val Email:String = null with get,set
member val MobilePhone:String = null with get,set
member val AccessGroup:String = null with get,set
member val EmailNotification:Boolean = new Boolean() with get,set
member val SMSNotification:Boolean = new Boolean() with get,set
member val EmailReminder:Boolean = new Boolean() with get,set
member val SMSReminder:Boolean = new Boolean() with get,set
[<AllowNullLiteral>]
type BookedResourceType() =
///<summary>
///The resource type id
///</summary>
[<ApiMember(Description="The resource type id")>]
member val Id:Int32 = new Int32() with get,set
///<summary>
///The resource type name
///</summary>
[<ApiMember(Description="The resource type name")>]
member val Name:String = null with get,set
///<summary>
///The resources inside resource type
///</summary>
[<ApiMember(Description="The resources inside resource type")>]
member val Resources:ResizeArray<BookedResource> = new ResizeArray<BookedResource>() with get,set
[<AllowNullLiteral>]
type BookedCompany() =
member val Id:Guid = new Guid() with get,set
member val Name:String = null with get,set
member val LogoType:Uri = null with get,set
member val Category:String = null with get,set
member val Street1:String = null with get,set
member val Street2:String = null with get,set
member val ZipCode:String = null with get,set
member val City:String = null with get,set
member val CountryId:String = null with get,set
member val Longitude:String = null with get,set
member val Latitude:String = null with get,set
member val Phone:String = null with get,set
member val Email:String = null with get,set
member val HomePage:String = null with get,set
member val SitePath:String = null with get,set
member val IsFavorite:Boolean = new Boolean() with get,set
member val PaymentProviderId:Nullable<Int32> = new Nullable<Int32>() with get,set
[<AllowNullLiteral>]
type BookedCustomer() =
member val Id:Guid = new Guid() with get,set
member val Firstname:String = null with get,set
member val Lastname:String = null with get,set
member val Email:String = null with get,set
member val Phone:String = null with get,set
member val FacebookUserName:String = null with get,set
member val ImageUrl:String = null with get,set
member val CorporateIdentityNumber:String = null with get,set
member val InvoiceAddress1:String = null with get,set
member val InvoiceAddress2:String = null with get,set
member val InvoiceCity:String = null with get,set
member val InvoicePostalCode:String = null with get,set
member val InvoiceCountryCode:String = null with get,set
[<AllowNullLiteral>]
type BookedQuantity() =
///<summary>
///The quantity Id
///</summary>
[<ApiMember(Description="The quantity Id")>]
member val Id:Int32 = new Int32() with get,set
///<summary>
///The quantity for booked on this price category
///</summary>
[<ApiMember(Description="The quantity for booked on this price category")>]
member val Quantity:Int32 = new Int32() with get,set
///<summary>
///The price
///</summary>
[<ApiMember(Description="The price")>]
member val Price:Nullable<Double> = new Nullable<Double>() with get,set
///<summary>
///The price bofore rebate codes
///</summary>
[<ApiMember(Description="The price bofore rebate codes")>]
member val PriceBeforeRebate:Nullable<Double> = new Nullable<Double>() with get,set
///<summary>
///The price currency
///</summary>
[<ApiMember(Description="The price currency")>]
member val CurrencyId:String = null with get,set
///<summary>
///The price sign
///</summary>
[<ApiMember(Description="The price sign")>]
member val PriceSign:String = null with get,set
///<summary>
///The price category
///</summary>
[<ApiMember(Description="The price category")>]
member val Category:String = null with get,set
///<summary>
///The price VAT in percent
///</summary>
[<ApiMember(Description="The price VAT in percent")>]
member val VAT:Nullable<Decimal> = new Nullable<Decimal>() with get,set
///<summary>
///The price text to display
///</summary>
[<ApiMember(Description="The price text to display")>]
member val PriceText:String = null with get,set
///<summary>
///If the quantity you add should occupy a spot. Default is true. If no it will only be a row that includes price information.
///</summary>
[<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.")>]
member val OccupiesSpot:Boolean = new Boolean() with get,set
[<AllowNullLiteral>]
type GroupBookingSettings() =
member val Active:Boolean = new Boolean() with get,set
member val Min:Int32 = new Int32() with get,set
member val Max:Int32 = new Int32() with get,set
[<AllowNullLiteral>]
type MultipleResourceSettings() =
member val Active:Boolean = new Boolean() with get,set
member val Min:Int32 = new Int32() with get,set
member val Max:Int32 = new Int32() with get,set
[<AllowNullLiteral>]
type ServiceInfoResponse() =
member val Id:Int32 = new Int32() with get,set
member val Name:String = null with get,set
member val Description:String = null with get,set
member val ImageUrl:Uri = null with get,set
member val LengthInMinutes:Nullable<Int32> = new Nullable<Int32>() with get,set
member val MaxNumberOfSpotsPerBooking:Int32 = new Int32() with get,set
member val MinNumberOfSpotsPerBooking:Int32 = new Int32() with get,set
member val GroupBooking:GroupBookingSettings = null with get,set
member val MultipleResource:MultipleResourceSettings = null with get,set
member val IsGroupBooking:Boolean = new Boolean() with get,set
member val IsPaymentEnabled:Boolean = new Boolean() with get,set
[<AllowNullLiteral>]
type BookingLogEventTypeResponse() =
///<summary>
///The event type id
///</summary>
[<ApiMember(Description="The event type id")>]
member val Id:Int32 = new Int32() with get,set
///<summary>
///The event type name
///</summary>
[<ApiMember(Description="The event type name")>]
member val Name:String = null with get,set
///<summary>
///The event type description
///</summary>
[<ApiMember(Description="The event type description")>]
member val Description:String = null with get,set
[<AllowNullLiteral>]
type BookingLogQueryResponse() =
///<summary>
///The booking log id
///</summary>
[<ApiMember(Description="The booking log id")>]
member val Id:Int32 = new Int32() with get,set
///<summary>
///The booking id
///</summary>
[<ApiMember(Description="The booking id")>]
member val BookingId:Int32 = new Int32() with get,set
///<summary>
///The type of event
///</summary>
[<ApiMember(Description="The type of event")>]
member val EventTypeId:Int32 = new Int32() with get,set
///<summary>
///The type of event
///</summary>
[<ApiMember(Description="The type of event")>]
member val EventType:BookingLogEventTypeResponse = null with get,set
///<summary>
///Comments that could be added to the event log item
///</summary>
[<ApiMember(Description="Comments that could be added to the event log item")>]
member val Comments:String = null with get,set
///<summary>
///The user created the event
///</summary>
[<ApiMember(Description="The user created the event")>]
member val UserName:String = null with get,set
///<summary>
///Then date when the event occured
///</summary>
[<ApiMember(Description="Then date when the event occured")>]
member val Created:DateTime = new DateTime() with get,set
[<AllowNullLiteral>]
type CurrencyInfoResponse() =
///<summary>
///The currency id
///</summary>
[<ApiMember(Description="The currency id")>]
member val Id:String = null with get,set
///<summary>
///The currency id
///</summary>
[<ApiMember(Description="The currency id")>]
member val Name:String = null with get,set
///<summary>
///The currency id
///</summary>
[<ApiMember(Description="The currency id")>]
member val CurrencySign:String = null with get,set
[<AllowNullLiteral>]
type BookingPaymentLogQueryResponse() =
///<summary>
///The booking payment log id
///</summary>
[<ApiMember(Description="The booking payment log id")>]
member val Id:Int32 = new Int32() with get,set
///<summary>
///The booking id
///</summary>
[<ApiMember(Description="The booking id")>]
member val BookingId:Int32 = new Int32() with get,set
///<summary>
///The payment reference id
///</summary>
[<ApiMember(Description="The payment reference id")>]
member val PaymentReferenceId:String = null with get,set
///<summary>
///The payment order item reference id
///</summary>
[<ApiMember(Description="The payment order item reference id")>]
member val OrderItemReferenceId:String = null with get,set
///<summary>
///The payment reference id
///</summary>
[<ApiMember(Description="The payment reference id")>]
member val PaymentProviderId:Nullable<Int32> = new Nullable<Int32>() with get,set
///<summary>
///The payment amount
///</summary>
[<ApiMember(Description="The payment amount")>]
member val Amount:Double = new Double() with get,set
///<summary>
///The payment VAT in percent
///</summary>
[<ApiMember(Description="The payment VAT in percent")>]
member val VAT:Decimal = new Decimal() with get,set
///<summary>
///The payment amount that is credited
///</summary>
[<ApiMember(Description="The payment amount that is credited")>]
member val AmountCredited:Double = new Double() with get,set
///<summary>
///The payment currency id
///</summary>
[<ApiMember(Description="The payment currency id")>]
member val CurrencyId:String = null with get,set
///<summary>
///The payment currency info
///</summary>
[<ApiMember(Description="The payment currency info")>]
member val CurrencyInfo:CurrencyInfoResponse = null with get,set
///<summary>
///Comments that could be added to the event log item
///</summary>
[<ApiMember(Description="Comments that could be added to the event log item")>]
member val Comments:String = null with get,set
///<summary>
///The date when the payment items was created
///</summary>
[<ApiMember(Description="The date when the payment items was created")>]
member val Created:DateTime = new DateTime() with get,set
///<summary>
///The date when the payment items was update
///</summary>
[<ApiMember(Description="The date when the payment items was update")>]
member val Updated:DateTime = new DateTime() with get,set
[<AllowNullLiteral>]
type BookingCheckoutQueryResponse() =
///<summary>
///The checkout id
///</summary>
[<ApiMember(Description="The checkout id")>]
member val Id:Guid = new Guid() with get,set
///<summary>
///The booking id
///</summary>
[<ApiMember(Description="The booking id")>]
member val BookingId:Int32 = new Int32() with get,set
///<summary>
///The purchase id
///</summary>
[<ApiMember(Description="The purchase id")>]
member val PurchaseId:Nullable<Int32> = new Nullable<Int32>() with get,set
///<summary>
///The payment checkout expiration datetime
///</summary>
[<ApiMember(Description="The payment checkout expiration datetime")>]
member val ExpirationTime:Nullable<DateTime> = new Nullable<DateTime>() with get,set
///<summary>
///The payment snippet code
///</summary>
[<ApiMember(Description="The payment snippet code")>]
member val Snippet:String = null with get,set
///<summary>
///The payment status
///</summary>
[<ApiMember(Description="The payment status")>]
member val Status:String = null with get,set
///<summary>
///Log message
///</summary>
[<ApiMember(Description="Log message")>]
member val Message:String = null with get,set
///<summary>
///When the checkout log item was created
///</summary>
[<ApiMember(Description="When the checkout log item was created")>]
member val Created:DateTime = new DateTime() with get,set
///<summary>
///When the checkout log item was updated
///</summary>
[<ApiMember(Description="When the checkout log item was updated")>]
member val Updated:DateTime = new DateTime() with get,set
[<AllowNullLiteral>]
type ExternalReferenceResponse() =
member val CompanyId:Guid = new Guid() with get,set
member val Id:Guid = new Guid() with get,set
member val OwnerId:Guid = new Guid() with get,set
member val ReferenceType:String = null with get,set
member val ExternalData:String = null with get,set
member val CreatedBy:String = null with get,set
member val Updated:DateTime = new DateTime() with get,set
member val Created:DateTime = new DateTime() with get,set
[<AllowNullLiteral>]
type BookingCalendarExportStatus() =
member val CalendarId:String = null with get,set
member val BookingId:Int32 = new Int32() with get,set
member val Synced:Nullable<Boolean> = new Nullable<Boolean>() with get,set
[<AllowNullLiteral>]
type BookingQueryResponse() =
member val Id:Int32 = new Int32() with get,set
member val CompanyId:Guid = new Guid() with get,set
member val From:DateTime = new DateTime() with get,set
member val To:DateTime = new DateTime() with get,set
member val Status:BookingStatusEnum = new BookingStatusEnum() with get,set
member val StatusId:Int32 = new Int32() with get,set
member val StatusName:String = null with get,set
member val StatusInfo:BookingStatusQueryResponse = null with get,set
member val SendEmailReminder:Boolean = new Boolean() with get,set
member val SendSmsReminder:Boolean = new Boolean() with get,set
member val SendSmsConfirmation:Boolean = new Boolean() with get,set
member val SendEmailConfirmation:Boolean = new Boolean() with get,set
member val LastTimeToUnBook:Nullable<DateTime> = new Nullable<DateTime>() with get,set
member val CustomFields:ResizeArray<CustomFieldConfigData> = new ResizeArray<CustomFieldConfigData>() with get,set
member val CustomFieldValues:ResizeArray<CustomFieldDataResponse> = new ResizeArray<CustomFieldDataResponse>() with get,set
member val BookedResourceTypes:ResizeArray<BookedResourceType> = new ResizeArray<BookedResourceType>() with get,set
member val Company:BookedCompany = null with get,set
member val Customer:BookedCustomer = null with get,set
member val Quantities:ResizeArray<BookedQuantity> = new ResizeArray<BookedQuantity>() with get,set
member val Service:ServiceInfoResponse = null with get,set
member val PaymentExpiration:Nullable<DateTime> = new Nullable<DateTime>() with get,set
member val Log:ResizeArray<BookingLogQueryResponse> = new ResizeArray<BookingLogQueryResponse>() with get,set
member val PaymentLog:ResizeArray<BookingPaymentLogQueryResponse> = new ResizeArray<BookingPaymentLogQueryResponse>() with get,set
member val CheckoutLog:ResizeArray<BookingCheckoutQueryResponse> = new ResizeArray<BookingCheckoutQueryResponse>() with get,set
member val ExternalReference:ResizeArray<ExternalReferenceResponse> = new ResizeArray<ExternalReferenceResponse>() with get,set
member val ResponseStatus:ResponseStatus = null with get,set
member val CalendarExportStatus:BookingCalendarExportStatus = null with get,set
member val LengthInMinutes:Nullable<Int32> = new Nullable<Int32>() with get,set
member val BookedBy:String = null with get,set
member val BookedComments:String = null with get,set
member val UnbookedComments:String = null with get,set
member val CommentsToCustomer:String = null with get,set
member val CreatedDate:DateTime = new DateTime() with get,set
member val UpdatedDate:DateTime = new DateTime() with get,set
member val UnbookedOn:Nullable<DateTime> = new Nullable<DateTime>() with get,set
member val CancellationCode:String = null with get,set
member val RatingCode:String = null with get,set
[<AllowNullLiteral>]
type FailedBookings() =
member val From:DateTime = new DateTime() with get,set
member val To:DateTime = new DateTime() with get,set
member val Reason:String = null with get,set
///<summary>
///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.
///</summary>
[<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.")>]
member val Quantities:QuantityToBook[] = [||] with get,set
[<AllowNullLiteral>]
type CreateBookingsResponse() =
///<summary>
///The datetime you want to end the booking.
///</summary>
[<ApiMember(Description="The datetime you want to end the booking.", IsRequired=true)>]
member val Created:ResizeArray<BookingQueryResponse> = new ResizeArray<BookingQueryResponse>() with get,set
///<summary>
///The dates that didn't work to book.
///</summary>
[<ApiMember(Description="The dates that didn't work to book.", IsRequired=true)>]
member val Failed:ResizeArray<FailedBookings> = new ResizeArray<FailedBookings>() with get,set
member val ResponseStatus:ResponseStatus = null with get,set
[<AllowNullLiteral>]
type CustomerToHandle() =
member val CustomerId:Nullable<Guid> = new Nullable<Guid>() with get,set
member val Firstname:String = null with get,set
member val Lastname:String = null with get,set
member val Email:String = null with get,set
member val Phone:String = null with get,set
member val SubscribedToNewsletter:Boolean = new Boolean() with get,set
[<AllowNullLiteral>]
type ResourceToBook() =
member val ResourceTypeId:Int32 = new Int32() with get,set
member val ResourceId:Int32 = new Int32() with get,set
type PaymentOptions =
| DefaultSetting = 0
| BookWithoutPayment = 1
| BookWithPaymentMessageToCustomer = 2
| BookWithManualPayment = 3
[<AllowNullLiteral>]
type AddCustomField() =
member val Id:Int32 = new Int32() with get,set
member val Value:String = null with get,set
[<AllowNullLiteral>]
type CreateBookingBase() =
///<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.")>]
member val CompanyId:Nullable<Guid> = new Nullable<Guid>() with get,set
///<summary>
///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.
///</summary>
[<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.")>]
member val CustomerId:Nullable<Guid> = new Nullable<Guid>() with get,set
///<summary>
///If company requires to be authenticated or a pin code entered to book on a specific customer, enter it here.
///</summary>
[<ApiMember(Description="If company requires to be authenticated or a pin code entered to book on a specific customer, enter it here.")>]
member val PinCode:String = null with get,set
///<summary>
///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.
///</summary>
[<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. ")>]
member val Customer:CustomerToHandle = null with get,set
///<summary>
///The service to be booked
///</summary>
[<ApiMember(Description="The service to be booked", IsRequired=true)>]
member val ServiceId:Int32 = new Int32() with get,set
///<summary>
///If you want to add comments to a booking you can add them here, this comments are never shared with the customer
///</summary>
[<ApiMember(Description="If you want to add comments to a booking you can add them here, this comments are never shared with the customer")>]
member val BookedComments:String = null with get,set
///<summary>
///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
///</summary>
[<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")>]
member val CommentsToCustomer:String = null with get,set
member val Resources:ResizeArray<ResourceToBook> = new ResizeArray<ResourceToBook>() with get,set
///<summary>
///Rebate codes applied to booking
///</summary>
[<ApiMember(Description="Rebate codes applied to booking")>]
member val RebateCodeIds:ResizeArray<Int32> = new ResizeArray<Int32>() with get,set
///<summary>
///If you want to send Email reminder
///</summary>
[<ApiMember(Description="If you want to send Email reminder")>]
member val SendEmailReminder:Nullable<Boolean> = new Nullable<Boolean>() with get,set
///<summary>
///If you want to send SMS reminder
///</summary>
[<ApiMember(Description="If you want to send SMS reminder")>]
member val SendSmsReminder:Nullable<Boolean> = new Nullable<Boolean>() with get,set
///<summary>
///If you want to send SMS confirmation
///</summary>
[<ApiMember(Description="If you want to send SMS confirmation")>]
member val SendSmsConfirmation:Nullable<Boolean> = new Nullable<Boolean>() with get,set
///<summary>
///Only admins are allowed to not send an email confirmation. Default is true
///</summary>
[<ApiMember(Description="Only admins are allowed to not send an email confirmation. Default is true")>]
member val SendEmailConfirmation:Nullable<Boolean> = new Nullable<Boolean>() with get,set
///<summary>
///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).
///</summary>
[<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).")>]
member val PaymentOption:PaymentOptions = new PaymentOptions() with get,set
///<summary>
///If Custom Fields are added to the booking, here you will send the id and the value for each custom field to be saved
///</summary>
[<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")>]
member val CustomFields:ResizeArray<AddCustomField> = new ResizeArray<AddCustomField>() with get,set
///<summary>
///If Custom Fields are added to the customer, here you will send the id and the value for each custom field to be updated
///</summary>
[<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")>]
member val CustomerCustomFields:ResizeArray<AddCustomField> = new ResizeArray<AddCustomField>() with get,set
///<summary>
///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
///</summary>
[<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")>]
member val AllowBookingOutsideSchedules:Boolean = new Boolean() with get,set
[<AllowNullLiteral>]
type DatesToRepeat() =
///<summary>
///Booking start
///</summary>
[<ApiMember(Description="Booking start")>]
member val From:DateTime = new DateTime() with get,set
///<summary>
///Booking end
///</summary>
[<ApiMember(Description="Booking end")>]
member val To:DateTime = new DateTime() with get,set
///<summary>
///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.
///</summary>
[<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.")>]
member val Quantities:QuantityToBook[] = [||] with get,set
[<ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)>]
[<AllowNullLiteral>]
type CreateBookings() =
inherit CreateBookingBase()
///<summary>
///Set the dates you want to book and it's quantities. It's an array of dates and quantities.
///</summary>
[<ApiMember(DataType="List<DatesToRepeat>", Description="Set the dates you want to book and it's quantities. It's an array of dates and quantities.", IsRequired=true)>]
member val DatesToRepeat:ResizeArray<DatesToRepeat> = new ResizeArray<DatesToRepeat>() with get,set
[<AllowNullLiteral>]
type QuantityToBook() =
///<summary>
///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)
///</summary>
[<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)>]
member val PriceId:Int32 = new Int32() with get,set
///<summary>
///Set the number of spots or resources you want to book on the specific price category
///</summary>
[<ApiMember(Description="Set the number of spots or resources you want to book on the specific price category", IsRequired=true)>]
member val Quantity:Int32 = new Int32() with get,set
///<summary>
///If the quantity you add should occupy a spot. Default is true. If no it will only be a row that includes price information.
///</summary>
[<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.")>]
member val OccupiesSpot:Boolean = new Boolean() with get,set
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /bookings/repeat HTTP/1.1
Host: api.bokamera.se
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<CreateBookings xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
<AllowBookingOutsideSchedules>false</AllowBookingOutsideSchedules>
<BookedComments>String</BookedComments>
<CommentsToCustomer>String</CommentsToCustomer>
<CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
<CustomFields>
<AddCustomField>
<Id>0</Id>
<Value>String</Value>
</AddCustomField>
</CustomFields>
<Customer>
<CustomerId>00000000-0000-0000-0000-000000000000</CustomerId>
<Email>String</Email>
<Firstname>String</Firstname>
<Lastname>String</Lastname>
<Phone>String</Phone>
<SubscribedToNewsletter>false</SubscribedToNewsletter>
</Customer>
<CustomerCustomFields>
<AddCustomField>
<Id>0</Id>
<Value>String</Value>
</AddCustomField>
</CustomerCustomFields>
<CustomerId>00000000-0000-0000-0000-000000000000</CustomerId>
<PaymentOption>DefaultSetting</PaymentOption>
<PinCode>String</PinCode>
<RebateCodeIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:int>0</d2p1:int>
</RebateCodeIds>
<Resources>
<ResourceToBook>
<ResourceId>0</ResourceId>
<ResourceTypeId>0</ResourceTypeId>
</ResourceToBook>
</Resources>
<SendEmailConfirmation>false</SendEmailConfirmation>
<SendEmailReminder>false</SendEmailReminder>
<SendSmsConfirmation>false</SendSmsConfirmation>
<SendSmsReminder>false</SendSmsReminder>
<ServiceId>0</ServiceId>
<DatesToRepeat>
<DatesToRepeat>
<From>0001-01-01T00:00:00</From>
<Quantities>
<QuantityToBook>
<OccupiesSpot>false</OccupiesSpot>
<PriceId>0</PriceId>
<Quantity>0</Quantity>
</QuantityToBook>
</Quantities>
<To>0001-01-01T00:00:00</To>
</DatesToRepeat>
</DatesToRepeat>
</CreateBookings>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <CreateBookingsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos"> <Created> <BookingQueryResponse> <BookedBy>String</BookedBy> <BookedComments>String</BookedComments> <BookedResourceTypes> <BookedResourceType> <Id>0</Id> <Name>String</Name> <Resources> <BookedResource> <AccessGroup>String</AccessGroup> <Color>String</Color> <Email>String</Email> <EmailNotification>false</EmailNotification> <EmailReminder>false</EmailReminder> <Id>0</Id> <ImageUrl i:nil="true" /> <MobilePhone>String</MobilePhone> <Name>String</Name> <SMSNotification>false</SMSNotification> <SMSReminder>false</SMSReminder> </BookedResource> </Resources> </BookedResourceType> </BookedResourceTypes> <CalendarExportStatus> <BookingId>0</BookingId> <CalendarId>String</CalendarId> <Synced>false</Synced> </CalendarExportStatus> <CancellationCode>String</CancellationCode> <CheckoutLog> <BookingCheckoutQueryResponse> <BookingId>0</BookingId> <Created>0001-01-01T00:00:00</Created> <ExpirationTime>0001-01-01T00:00:00</ExpirationTime> <Id>00000000-0000-0000-0000-000000000000</Id> <Message>String</Message> <PurchaseId>0</PurchaseId> <Snippet>String</Snippet> <Status>String</Status> <Updated>0001-01-01T00:00:00</Updated> </BookingCheckoutQueryResponse> </CheckoutLog> <CommentsToCustomer>String</CommentsToCustomer> <Company> <Category>String</Category> <City>String</City> <CountryId>String</CountryId> <Email>String</Email> <HomePage>String</HomePage> <Id>00000000-0000-0000-0000-000000000000</Id> <IsFavorite>false</IsFavorite> <Latitude>String</Latitude> <LogoType i:nil="true" /> <Longitude>String</Longitude> <Name>String</Name> <PaymentProviderId>0</PaymentProviderId> <Phone>String</Phone> <SitePath>String</SitePath> <Street1>String</Street1> <Street2>String</Street2> <ZipCode>String</ZipCode> </Company> <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId> <CreatedDate>0001-01-01T00:00:00</CreatedDate> <CustomFieldValues> <CustomFieldDataResponse> <Column>String</Column> <DataType>String</DataType> <Description>String</Description> <Id>0</Id> <Name>String</Name> <Value>String</Value> </CustomFieldDataResponse> </CustomFieldValues> <CustomFields> <CustomFieldConfigData> <DataType>String</DataType> <DefaultValue>String</DefaultValue> <Description>String</Description> <Id>0</Id> <IsMandatory>false</IsMandatory> <MandatoryErrorMessage>String</MandatoryErrorMessage> <MaxLength>0</MaxLength> <MultipleLineText>false</MultipleLineText> <Name>String</Name> <RegEx>String</RegEx> <RegExErrorMessage>String</RegExErrorMessage> <Values> <CustomFieldValueResponse> <Value>String</Value> </CustomFieldValueResponse> </Values> <Width>0</Width> </CustomFieldConfigData> </CustomFields> <Customer> <CorporateIdentityNumber>String</CorporateIdentityNumber> <Email>String</Email> <FacebookUserName>String</FacebookUserName> <Firstname>String</Firstname> <Id>00000000-0000-0000-0000-000000000000</Id> <ImageUrl>String</ImageUrl> <InvoiceAddress1>String</InvoiceAddress1> <InvoiceAddress2>String</InvoiceAddress2> <InvoiceCity>String</InvoiceCity> <InvoiceCountryCode>String</InvoiceCountryCode> <InvoicePostalCode>String</InvoicePostalCode> <Lastname>String</Lastname> <Phone>String</Phone> </Customer> <ExternalReference> <ExternalReferenceResponse> <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId> <Created>0001-01-01T00:00:00</Created> <CreatedBy>String</CreatedBy> <ExternalData>String</ExternalData> <Id>00000000-0000-0000-0000-000000000000</Id> <OwnerId>00000000-0000-0000-0000-000000000000</OwnerId> <ReferenceType>String</ReferenceType> <Updated>0001-01-01T00:00:00</Updated> </ExternalReferenceResponse> </ExternalReference> <From>0001-01-01T00:00:00</From> <Id>0</Id> <LastTimeToUnBook>0001-01-01T00:00:00</LastTimeToUnBook> <LengthInMinutes>0</LengthInMinutes> <Log> <BookingLogQueryResponse> <BookingId>0</BookingId> <Comments>String</Comments> <Created>0001-01-01T00:00:00</Created> <EventType> <Description>String</Description> <Id>0</Id> <Name>String</Name> </EventType> <EventTypeId>0</EventTypeId> <Id>0</Id> <UserName>String</UserName> </BookingLogQueryResponse> </Log> <PaymentExpiration>0001-01-01T00:00:00</PaymentExpiration> <PaymentLog> <BookingPaymentLogQueryResponse> <Amount>0</Amount> <AmountCredited>0</AmountCredited> <BookingId>0</BookingId> <Comments>String</Comments> <Created>0001-01-01T00:00:00</Created> <CurrencyId>String</CurrencyId> <CurrencyInfo> <CurrencySign>String</CurrencySign> <Id>String</Id> <Name>String</Name> </CurrencyInfo> <Id>0</Id> <OrderItemReferenceId>String</OrderItemReferenceId> <PaymentProviderId>0</PaymentProviderId> <PaymentReferenceId>String</PaymentReferenceId> <Updated>0001-01-01T00:00:00</Updated> <VAT>0</VAT> </BookingPaymentLogQueryResponse> </PaymentLog> <Quantities> <BookedQuantity> <Category>String</Category> <CurrencyId>String</CurrencyId> <Id>0</Id> <OccupiesSpot>false</OccupiesSpot> <Price>0</Price> <PriceBeforeRebate>0</PriceBeforeRebate> <PriceSign>String</PriceSign> <PriceText>String</PriceText> <Quantity>0</Quantity> <VAT>0</VAT> </BookedQuantity> </Quantities> <RatingCode>String</RatingCode> <ResponseStatus xmlns:d4p1="http://schemas.servicestack.net/types"> <d4p1:ErrorCode>String</d4p1:ErrorCode> <d4p1:Message>String</d4p1:Message> <d4p1:StackTrace>String</d4p1:StackTrace> <d4p1:Errors> <d4p1:ResponseError> <d4p1:ErrorCode>String</d4p1:ErrorCode> <d4p1:FieldName>String</d4p1:FieldName> <d4p1:Message>String</d4p1:Message> <d4p1:Meta xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d7p1:KeyValueOfstringstring> <d7p1:Key>String</d7p1:Key> <d7p1:Value>String</d7p1:Value> </d7p1:KeyValueOfstringstring> </d4p1:Meta> </d4p1:ResponseError> </d4p1:Errors> <d4p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d5p1:KeyValueOfstringstring> <d5p1:Key>String</d5p1:Key> <d5p1:Value>String</d5p1:Value> </d5p1:KeyValueOfstringstring> </d4p1:Meta> </ResponseStatus> <SendEmailConfirmation>false</SendEmailConfirmation> <SendEmailReminder>false</SendEmailReminder> <SendSmsConfirmation>false</SendSmsConfirmation> <SendSmsReminder>false</SendSmsReminder> <Service> <Description>String</Description> <GroupBooking> <Active>false</Active> <Max>0</Max> <Min>0</Min> </GroupBooking> <Id>0</Id> <ImageUrl i:nil="true" /> <IsGroupBooking>false</IsGroupBooking> <IsPaymentEnabled>false</IsPaymentEnabled> <LengthInMinutes>0</LengthInMinutes> <MaxNumberOfSpotsPerBooking>0</MaxNumberOfSpotsPerBooking> <MinNumberOfSpotsPerBooking>0</MinNumberOfSpotsPerBooking> <MultipleResource> <Active>false</Active> <Max>0</Max> <Min>0</Min> </MultipleResource> <Name>String</Name> </Service> <Status>Booked</Status> <StatusId>0</StatusId> <StatusInfo> <Color>String</Color> <Description>String</Description> <Icon>String</Icon> <Id>0</Id> <Name>String</Name> </StatusInfo> <StatusName>String</StatusName> <To>0001-01-01T00:00:00</To> <UnbookedComments>String</UnbookedComments> <UnbookedOn>0001-01-01T00:00:00</UnbookedOn> <UpdatedDate>0001-01-01T00:00:00</UpdatedDate> </BookingQueryResponse> </Created> <Failed> <FailedBookings> <From>0001-01-01T00:00:00</From> <Quantities> <QuantityToBook> <OccupiesSpot>false</OccupiesSpot> <PriceId>0</PriceId> <Quantity>0</Quantity> </QuantityToBook> </Quantities> <Reason>String</Reason> <To>0001-01-01T00:00:00</To> </FailedBookings> </Failed> <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types"> <d2p1:ErrorCode>String</d2p1:ErrorCode> <d2p1:Message>String</d2p1:Message> <d2p1:StackTrace>String</d2p1:StackTrace> <d2p1:Errors> <d2p1:ResponseError> <d2p1:ErrorCode>String</d2p1:ErrorCode> <d2p1:FieldName>String</d2p1:FieldName> <d2p1:Message>String</d2p1:Message> <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d5p1:KeyValueOfstringstring> <d5p1:Key>String</d5p1:Key> <d5p1:Value>String</d5p1:Value> </d5p1:KeyValueOfstringstring> </d2p1:Meta> </d2p1:ResponseError> </d2p1:Errors> <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d3p1:KeyValueOfstringstring> <d3p1:Key>String</d3p1:Key> <d3p1:Value>String</d3p1:Value> </d3p1:KeyValueOfstringstring> </d2p1:Meta> </ResponseStatus> </CreateBookingsResponse>