| DELETE | /bookings/{Id} | Canceling existing booking | Canceling an existing booking if you are authorized to do so. |
|---|
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | path | int? | No | Id of the booking |
| UnBookedComments | query | string | Yes | If you want to add comments when canceling a booking you can add them here and it will be saved to the log |
| Message | query | string | Yes | Any comment sent to user if SendSmsConfirmation or SendEmailConfirmation |
| SendSmsConfirmation | query | bool? | No | If you want to send SMS confirmation. If null, it will take the default value of the bookings SendSMSConfirmation. |
| SendEmailConfirmation | query | bool? | No | If you want to send Email confirmation. If null, it will take the default value of the bookings SendEmailConfirmation. |
| 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 | Yes | |
| StatusInfo | form | BookingStatusQueryResponse | Yes | |
| SendEmailReminder | form | bool | No | |
| SendSmsReminder | form | bool | No | |
| SendSmsConfirmation | form | bool | No | |
| SendEmailConfirmation | form | bool | No | |
| LastTimeToUnBook | form | DateTime? | No | |
| CustomFields | form | List<CustomFieldConfigData> | Yes | |
| CustomFieldValues | form | List<CustomFieldDataResponse> | Yes | |
| BookedResourceTypes | form | List<BookedResourceType> | Yes | |
| Company | form | BookedCompany | Yes | |
| Customer | form | BookedCustomer | Yes | |
| Quantities | form | List<BookedQuantity> | Yes | |
| Service | form | ServiceInfoResponse | Yes | |
| InvoiceAddress | form | InvoiceAddressResponse | Yes | |
| PaymentExpiration | form | DateTime? | No | |
| Log | form | List<BookingLogQueryResponse> | Yes | |
| PaymentLog | form | List<BookingPaymentLogQueryResponse> | Yes | |
| CheckoutLog | form | List<BookingCheckoutQueryResponse> | Yes | |
| ExternalReference | form | List<ExternalReferenceResponse> | Yes | |
| ResponseStatus | form | ResponseStatus | Yes | |
| LengthInMinutes | form | int? | No | |
| BookedBy | form | string | Yes | |
| BookedComments | form | string | Yes | |
| UnbookedComments | form | string | Yes | |
| CommentsToCustomer | form | string | Yes | |
| CreatedDate | form | DateTime | No | |
| UpdatedDate | form | DateTime | No | |
| UnbookedOn | form | DateTime? | No | |
| CancellationCode | form | string | Yes | |
| RatingCode | form | string | Yes |
| 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 | Yes | |
| Description | form | string | Yes | |
| Icon | form | string | Yes | |
| Color | form | string | Yes |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | int | No | Custom field id |
| Name | form | string | Yes | Configuration name. Example: 'Number of persons'. |
| Description | form | string | Yes | Custom field description. Example: 'For how many persons is this booking?' |
| Width | form | int? | No | Field width. Example: 20 for 20px |
| DataType | form | string | Yes | Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox' |
| DefaultValue | form | string | Yes | 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 | Yes | 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 | Yes | Regular expression used for validation of the field |
| RegExErrorMessage | form | string | Yes | Error message shown if the regular expression validation failed |
| Values | form | List<CustomFieldValueResponse> | Yes | The values to select from if Datatype is DropDown for this custom field |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Value | form | string | Yes |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | int | No | |
| Column | form | string | Yes | |
| Name | form | string | Yes | |
| Description | form | string | Yes | |
| Value | form | string | Yes | |
| DataType | form | string | Yes | 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 | Yes | The resource type name |
| Resources | form | List<BookedResource> | Yes | The resources inside resource type |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | int | No | |
| Name | form | string | Yes | |
| Color | form | string | Yes | |
| ImageUrl | form | Uri | Yes | |
| form | string | Yes | ||
| MobilePhone | form | string | Yes | |
| AccessGroup | form | string | Yes | |
| 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 | Yes | |
| LogoType | form | Uri | Yes | |
| Category | form | string | Yes | |
| Street1 | form | string | Yes | |
| Street2 | form | string | Yes | |
| ZipCode | form | string | Yes | |
| City | form | string | Yes | |
| CountryId | form | string | Yes | |
| Longitude | form | string | Yes | |
| Latitude | form | string | Yes | |
| Phone | form | string | Yes | |
| form | string | Yes | ||
| HomePage | form | string | Yes | |
| SitePath | form | string | Yes | |
| IsFavorite | form | bool | No | |
| PaymentProviderId | form | int? | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | Guid | No | |
| Firstname | form | string | Yes | |
| Lastname | form | string | Yes | |
| form | string | Yes | ||
| Phone | form | string | Yes | |
| FacebookUserName | form | string | Yes | |
| ImageUrl | form | string | Yes | |
| CorporateIdentityNumber | form | string | Yes | |
| InvoiceAddress1 | form | string | Yes | |
| InvoiceAddress2 | form | string | Yes | |
| InvoiceCity | form | string | Yes | |
| InvoicePostalCode | form | string | Yes | |
| InvoiceCountryCode | form | string | Yes |
| 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 | Yes | The price currency |
| PriceSign | form | string | Yes | The price sign |
| Category | form | string | Yes | The price category |
| VAT | form | decimal? | No | The price VAT in percent |
| PriceText | form | string | Yes | 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 | Yes | |
| Description | form | string | Yes | |
| ImageUrl | form | Uri | Yes | |
| LengthInMinutes | form | int? | No | |
| MaxNumberOfSpotsPerBooking | form | int | No | |
| MinNumberOfSpotsPerBooking | form | int | No | |
| GroupBooking | form | GroupBookingSettings | Yes | |
| MultipleResource | form | MultipleResourceSettings | Yes | |
| 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 |
|---|---|---|---|---|
| InvoiceAddressId | form | Guid | No | |
| UserId | form | Guid? | No | |
| CorporateIdentityNumber | form | string | Yes | |
| InvoiceAddress1 | form | string | Yes | |
| InvoiceAddress2 | form | string | Yes | |
| InvoiceCity | form | string | Yes | |
| InvoicePostalCode | form | string | Yes | |
| InvoiceCountryCode | form | string | Yes |
| 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 | Yes | The type of event |
| Comments | form | string | Yes | Comments that could be added to the event log item |
| UserName | form | string | Yes | The user created the event |
| Created | form | DateTime | No | The date when the event occurred |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | int | No | The event type id |
| Name | form | string | Yes | The event type name |
| Description | form | string | Yes | 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 | Yes | The payment reference id |
| OrderItemReferenceId | form | string | Yes | 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 | Yes | The payment currency id |
| CurrencyInfo | form | CurrencyInfoResponse | Yes | The payment currency info |
| Comments | form | string | Yes | 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 were updated. |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | string | Yes | The currency id |
| Name | form | string | Yes | The currency id |
| CurrencySign | form | string | Yes | 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 | Yes | The payment snippet code |
| Status | form | string | Yes | The payment status |
| Message | form | string | Yes | 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 | Yes | |
| ReferenceTypeId | form | int | No | |
| ExternalData | form | string | Yes | |
| CreatedBy | form | string | Yes | |
| Updated | form | DateTime | No | |
| Created | form | DateTime | No |
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.
DELETE /bookings/{Id} HTTP/1.1
Host: api.bokamera.se
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<BookingQueryResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
<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>
<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>
<ReferenceTypeId>0</ReferenceTypeId>
<Updated>0001-01-01T00:00:00</Updated>
</ExternalReferenceResponse>
</ExternalReference>
<From>0001-01-01T00:00:00</From>
<Id>0</Id>
<InvoiceAddress>
<CorporateIdentityNumber>String</CorporateIdentityNumber>
<InvoiceAddress1>String</InvoiceAddress1>
<InvoiceAddress2>String</InvoiceAddress2>
<InvoiceAddressId>00000000-0000-0000-0000-000000000000</InvoiceAddressId>
<InvoiceCity>String</InvoiceCity>
<InvoiceCountryCode>String</InvoiceCountryCode>
<InvoicePostalCode>String</InvoicePostalCode>
<UserId>00000000-0000-0000-0000-000000000000</UserId>
</InvoiceAddress>
<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: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>
<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>