Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
PUT | /bookings/{Id}/decline | Decline a booking that is reserved and awaiting approval | Updates an existing booking with canceled status if you are authorized to do so. |
---|
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
CompanyId | body | Guid? | No | The company id, if empty will use the company id for the user you are logged in with. |
Id | path | int? | Yes | Id of the booking |
Comment | body | string | No | Any comment logged to the booking history |
Message | body | string | No | Any comment sent to user if SendSmsConfirmation or SendEmailConfirmation |
SendSmsConfirmation | body | bool? | No | If you want to send SMS confirmation. If null, it will take the default value of the bookings SendSMSConfirmation. |
SendEmailConfirmation | body | 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 | 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 |
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.
PUT /bookings/{Id}/decline HTTP/1.1
Host: api.bokamera.se
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<DeclineBooking xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
<Comment>String</Comment>
<CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
<Id>0</Id>
<Message>String</Message>
<SendEmailConfirmation>false</SendEmailConfirmation>
<SendSmsConfirmation>false</SendSmsConfirmation>
</DeclineBooking>
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> <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: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>