POST | /bookings/repeat | Create new bookings | Create new bookings if you are authorized to do so. |
---|
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
DatesToRepeat | body | List<DatesToRepeat> | Yes | Set the dates you want to book and it's quantities. It's an array of dates and quantities. |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
CompanyId | form | Guid? | No | The company id, if empty will use the company id for the user you are logged in with. |
CustomerId | form | Guid? | No | 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. |
PinCode | form | string | No | If company requires to be authenticated or a pin code entered to book on a specific customer, enter it here. |
Customer | form | CustomerToHandle | No | 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. |
ServiceId | form | int | Yes | The service to be booked |
BookedComments | form | string | No | If you want to add comments to a booking you can add them here, this comments are never shared with the customer |
CommentsToCustomer | form | string | No | 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 |
Resources | form | List<ResourceToBook> | No | |
RebateCodeIds | form | List<int> | No | Rebate codes applied to booking |
SendEmailReminder | form | bool? | No | If you want to send Email reminder |
SendSmsReminder | form | bool? | No | If you want to send SMS reminder |
SendSmsConfirmation | form | bool? | No | If you want to send SMS confirmation |
SendEmailConfirmation | form | bool? | No | Only admins are allowed to not send an email confirmation. Default is true |
PaymentOption | form | PaymentOptions | No | 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). |
CustomFields | form | List<AddCustomField> | No | If Custom Fields are added to the booking, here you will send the id and the value for each custom field to be saved |
CustomerCustomFields | form | List<AddCustomField> | No | If Custom Fields are added to the customer, here you will send the id and the value for each custom field to be updated |
AllowBookingOutsideSchedules | form | bool | No | 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 |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
CustomerId | form | Guid? | No | |
Firstname | form | string | No | |
Lastname | form | string | No | |
form | string | No | ||
Phone | form | string | No | |
SubscribedToNewsletter | form | bool | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
ResourceTypeId | form | int | No | |
ResourceId | form | int | No |
DefaultSetting | |
BookWithoutPayment | |
BookWithPaymentMessageToCustomer | |
BookWithManualPayment |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Id | form | int | No | |
Value | form | string | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
From | form | DateTime | No | Booking start |
To | form | DateTime | No | Booking end |
Quantities | form | QuantityToBook[] | No | 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. |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
PriceId | form | int | Yes | 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) |
Quantity | form | int | Yes | Set the number of spots or resources you want to book on the specific price category |
OccupiesSpot | form | bool | No | If the quantity you add should occupy a spot. Default is true. If no it will only be a row that includes price information. |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Created | form | List<BookingQueryResponse> | Yes | The datetime you want to end the booking. |
Failed | form | List<FailedBookings> | Yes | The dates that didn't work to book. |
ResponseStatus | form | ResponseStatus | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Id | form | int | No | |
CompanyId | form | Guid | No | |
From | form | DateTime | No | |
To | form | DateTime | No | |
Status | form | BookingStatusEnum | No | |
StatusId | form | int | No | |
StatusName | form | string | No | |
StatusInfo | form | BookingStatusQueryResponse | No | |
SendEmailReminder | form | bool | No | |
SendSmsReminder | form | bool | No | |
SendSmsConfirmation | form | bool | No | |
SendEmailConfirmation | form | bool | No | |
LastTimeToUnBook | form | DateTime? | No | |
CustomFields | form | List<CustomFieldConfigData> | No | |
CustomFieldValues | form | List<CustomFieldDataResponse> | No | |
BookedResourceTypes | form | List<BookedResourceType> | No | |
Company | form | BookedCompany | No | |
Customer | form | BookedCustomer | No | |
Quantities | form | List<BookedQuantity> | No | |
Service | form | ServiceInfoResponse | No | |
PaymentExpiration | form | DateTime? | No | |
Log | form | List<BookingLogQueryResponse> | No | |
PaymentLog | form | List<BookingPaymentLogQueryResponse> | No | |
CheckoutLog | form | List<BookingCheckoutQueryResponse> | No | |
ExternalReference | form | List<ExternalReferenceResponse> | No | |
ResponseStatus | form | ResponseStatus | No | |
CalendarExportStatus | form | BookingCalendarExportStatus | No | |
LengthInMinutes | form | int? | No | |
BookedBy | form | string | No | |
BookedComments | form | string | No | |
UnbookedComments | form | string | No | |
CommentsToCustomer | form | string | No | |
CreatedDate | form | DateTime | No | |
UpdatedDate | form | DateTime | No | |
UnbookedOn | form | DateTime? | No | |
CancellationCode | form | string | No | |
RatingCode | form | string | No |
Name | Value | |
---|---|---|
Booked | 1 | |
Unbooked | 2 | |
Reserved | 3 | |
Canceled | 4 | |
AwaitingPayment | 5 | |
AwaitingPaymentNoTimeLimit | 6 | |
Payed | 7 | |
AwaitingPaymentRequestFromAdmin | 8 | |
AwaitingPaymentFromProvider | 9 | |
Invoiced | 10 |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Id | form | int | No | |
Name | form | string | No | |
Description | form | string | No | |
Icon | form | string | No | |
Color | form | string | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Id | form | int | No | Custom field id |
Name | form | string | No | Configuration name. Example: 'Number of persons'. |
Description | form | string | No | Custom field description. Example: 'For how many persons is this booking?' |
Width | form | int? | No | Field width. Example: 20 for 20px |
DataType | form | string | No | Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox' |
DefaultValue | form | string | No | Default value of the field. Example: '3' |
IsMandatory | form | bool | No | Determines if the field is required to have a value or not |
MandatoryErrorMessage | form | string | No | Error message shown to the user if the field data is required but not entered |
MaxLength | form | int | No | Max lenght of the field |
MultipleLineText | form | bool | No | If the field should have multiple lines |
RegEx | form | string | No | Regular expression used for validation of the field |
RegExErrorMessage | form | string | No | Error message shown if the regular expression validation failed |
Values | form | List<CustomFieldValueResponse> | No | The values to select from if Datatype is DropDown for this custom field |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Value | form | string | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Id | form | int | No | |
Column | form | string | No | |
Name | form | string | No | |
Description | form | string | No | |
Value | form | string | No | |
DataType | form | string | No | Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox' |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Id | form | int | No | The resource type id |
Name | form | string | No | The resource type name |
Resources | form | List<BookedResource> | No | The resources inside resource type |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Id | form | int | No | |
Name | form | string | No | |
Color | form | string | No | |
ImageUrl | form | Uri | No | |
form | string | No | ||
MobilePhone | form | string | No | |
AccessGroup | form | string | No | |
EmailNotification | form | bool | No | |
SMSNotification | form | bool | No | |
EmailReminder | form | bool | No | |
SMSReminder | form | bool | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Id | form | Guid | No | |
Name | form | string | No | |
LogoType | form | Uri | No | |
Category | form | string | No | |
Street1 | form | string | No | |
Street2 | form | string | No | |
ZipCode | form | string | No | |
City | form | string | No | |
CountryId | form | string | No | |
Longitude | form | string | No | |
Latitude | form | string | No | |
Phone | form | string | No | |
form | string | No | ||
HomePage | form | string | No | |
SitePath | form | string | No | |
IsFavorite | form | bool | No | |
PaymentProviderId | form | int? | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Id | form | Guid | No | |
Firstname | form | string | No | |
Lastname | form | string | No | |
form | string | No | ||
Phone | form | string | No | |
FacebookUserName | form | string | No | |
ImageUrl | form | string | No | |
CorporateIdentityNumber | form | string | No | |
InvoiceAddress1 | form | string | No | |
InvoiceAddress2 | form | string | No | |
InvoiceCity | form | string | No | |
InvoicePostalCode | form | string | No | |
InvoiceCountryCode | form | string | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Id | form | int | No | The quantity Id |
Quantity | form | int | No | The quantity for booked on this price category |
Price | form | double? | No | The price |
PriceBeforeRebate | form | double? | No | The price bofore rebate codes |
CurrencyId | form | string | No | The price currency |
PriceSign | form | string | No | The price sign |
Category | form | string | No | The price category |
VAT | form | decimal? | No | The price VAT in percent |
PriceText | form | string | No | The price text to display |
OccupiesSpot | form | bool | No | If the quantity you add should occupy a spot. Default is true. If no it will only be a row that includes price information. |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Id | form | int | No | |
Name | form | string | No | |
Description | form | string | No | |
ImageUrl | form | Uri | No | |
LengthInMinutes | form | int? | No | |
MaxNumberOfSpotsPerBooking | form | int | No | |
MinNumberOfSpotsPerBooking | form | int | No | |
GroupBooking | form | GroupBookingSettings | No | |
MultipleResource | form | MultipleResourceSettings | No | |
IsGroupBooking | form | bool | No | |
IsPaymentEnabled | form | bool | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Active | form | bool | No | |
Min | form | int | No | |
Max | form | int | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Active | form | bool | No | |
Min | form | int | No | |
Max | form | int | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Id | form | int | No | The booking log id |
BookingId | form | int | No | The booking id |
EventTypeId | form | int | No | The type of event |
EventType | form | BookingLogEventTypeResponse | No | The type of event |
Comments | form | string | No | Comments that could be added to the event log item |
UserName | form | string | No | The user created the event |
Created | form | DateTime | No | Then date when the event occured |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Id | form | int | No | The event type id |
Name | form | string | No | The event type name |
Description | form | string | No | The event type description |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Id | form | int | No | The booking payment log id |
BookingId | form | int | No | The booking id |
PaymentReferenceId | form | string | No | The payment reference id |
OrderItemReferenceId | form | string | No | The payment order item reference id |
PaymentProviderId | form | int? | No | The payment reference id |
Amount | form | double | No | The payment amount |
VAT | form | decimal | No | The payment VAT in percent |
AmountCredited | form | double | No | The payment amount that is credited |
CurrencyId | form | string | No | The payment currency id |
CurrencyInfo | form | CurrencyInfoResponse | No | The payment currency info |
Comments | form | string | No | Comments that could be added to the event log item |
Created | form | DateTime | No | The date when the payment items was created |
Updated | form | DateTime | No | The date when the payment items was update |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Id | form | string | No | The currency id |
Name | form | string | No | The currency id |
CurrencySign | form | string | No | The currency id |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Id | form | Guid | No | The checkout id |
BookingId | form | int | No | The booking id |
PurchaseId | form | int? | No | The purchase id |
ExpirationTime | form | DateTime? | No | The payment checkout expiration datetime |
Snippet | form | string | No | The payment snippet code |
Status | form | string | No | The payment status |
Message | form | string | No | Log message |
Created | form | DateTime | No | When the checkout log item was created |
Updated | form | DateTime | No | When the checkout log item was updated |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
CompanyId | form | Guid | No | |
Id | form | Guid | No | |
OwnerId | form | Guid | No | |
ReferenceType | form | string | No | |
ExternalData | form | string | No | |
CreatedBy | form | string | No | |
Updated | form | DateTime | No | |
Created | form | DateTime | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
CalendarId | form | string | No | |
BookingId | form | int | No | |
Synced | form | bool? | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
From | form | DateTime | No | |
To | form | DateTime | No | |
Reason | form | string | No | |
Quantities | form | QuantityToBook[] | No | 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. |
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
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: text/jsv
Content-Type: text/jsv
Content-Length: length
{
DatesToRepeat:
[
{
Quantities:
[
{
PriceId: 0,
Quantity: 0,
OccupiesSpot: False
}
]
}
],
CompanyId: 00000000-0000-0000-0000-000000000000,
CustomerId: 00000000-0000-0000-0000-000000000000,
PinCode: String,
Customer:
{
CustomerId: 00000000-0000-0000-0000-000000000000,
Firstname: String,
Lastname: String,
Email: String,
Phone: String,
SubscribedToNewsletter: False
},
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 { Created: [ { 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, MinNumberOfSpotsPerBooking: 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 } ], Failed: [ { Reason: String, Quantities: [ { PriceId: 0, Quantity: 0, OccupiesSpot: False } ] } ], ResponseStatus: { ErrorCode: String, Message: String, StackTrace: String, Errors: [ { ErrorCode: String, FieldName: String, Message: String, Meta: { String: String } } ], Meta: { String: String } } }