BokaMera.API.Host

<back to all web services

DeleteBookingByCode

The following routes are available for this service:
DELETE/bookings/deletebycode/{Id}Canceling existing bookingCanceling an existing booking if you are authorized to do so.
DeleteBookingByCode Parameters:
NameParameterData TypeRequiredDescription
IdpathintYesId of the booking
UnBookedCommentsquerystringNoIf you want to add comments when canceling a booking you can add them here and it will be saved to the log
CancellationCodequerystringYesThe unique cancelation code for that booking
BookingQueryResponse Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
CompanyIdformGuidNo
FromformDateTimeNo
ToformDateTimeNo
StatusformBookingStatusEnumNo
StatusIdformintNo
StatusNameformstringNo
StatusInfoformBookingStatusQueryResponseNo
SendEmailReminderformboolNo
SendSmsReminderformboolNo
SendSmsConfirmationformboolNo
SendEmailConfirmationformboolNo
LastTimeToUnBookformDateTime?No
CustomFieldsformList<CustomFieldConfigData>No
CustomFieldValuesformList<CustomFieldDataResponse>No
BookedResourceTypesformList<BookedResourceType>No
CompanyformBookedCompanyNo
CustomerformBookedCustomerNo
QuantitiesformList<BookedQuantity>No
ServiceformServiceInfoResponseNo
PaymentExpirationformDateTime?No
LogformList<BookingLogQueryResponse>No
PaymentLogformList<BookingPaymentLogQueryResponse>No
CheckoutLogformList<BookingCheckoutQueryResponse>No
ExternalReferenceformList<ExternalReferenceResponse>No
ResponseStatusformResponseStatusNo
CalendarExportStatusformBookingCalendarExportStatusNo
LengthInMinutesformint?No
BookedByformstringNo
BookedCommentsformstringNo
UnbookedCommentsformstringNo
CommentsToCustomerformstringNo
CreatedDateformDateTimeNo
UpdatedDateformDateTimeNo
UnbookedOnformDateTime?No
CancellationCodeformstringNo
RatingCodeformstringNo
BookingStatusEnum Enum:
NameValue
Booked1
Unbooked2
Reserved3
Canceled4
AwaitingPayment5
AwaitingPaymentNoTimeLimit6
Payed7
AwaitingPaymentRequestFromAdmin8
AwaitingPaymentFromProvider9
BookingStatusQueryResponse Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
NameformstringNo
DescriptionformstringNo
IconformstringNo
ColorformstringNo
CustomFieldConfigData Parameters:
NameParameterData TypeRequiredDescription
IdformintNoCustom field id
NameformstringNoConfiguration name. Example: 'Number of persons'.
DescriptionformstringNoCustom field description. Example: 'For how many persons is this booking?'
Widthformint?NoField width. Example: 20 for 20px
DataTypeformstringNoData field of custom field. Valid values are: TextBox, ... Example: 'TextBox'
DefaultValueformstringNoDefault value of the field. Example: '3'
IsMandatoryformboolNoDetermines if the field is required to have a value or not
MandatoryErrorMessageformstringNoError message shown to the user if the field data is required but not entered
MaxLengthformintNoMax lenght of the field
MultipleLineTextformboolNoIf the field should have multiple lines
RegExformstringNoRegular expression used for validation of the field
RegExErrorMessageformstringNoError message shown if the regular expression validation failed
ValuesformList<CustomFieldValueResponse>NoThe values to select from if Datatype is DropDown for this custom field
CustomFieldValueResponse Parameters:
NameParameterData TypeRequiredDescription
ValueformstringNo
CustomFieldDataResponse Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
ColumnformstringNo
NameformstringNo
DescriptionformstringNo
ValueformstringNo
DataTypeformstringNoData field of custom field. Valid values are: TextBox, ... Example: 'TextBox'
BookedResourceType Parameters:
NameParameterData TypeRequiredDescription
IdformintNoThe resource type id
NameformstringNoThe resource type name
ResourcesformList<BookedResource>NoThe resources inside resource type
BookedResource Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
NameformstringNo
ColorformstringNo
ImageUrlformUriNo
EmailformstringNo
MobilePhoneformstringNo
AccessGroupformstringNo
EmailNotificationformboolNo
SMSNotificationformboolNo
EmailReminderformboolNo
SMSReminderformboolNo
BookedCompany Parameters:
NameParameterData TypeRequiredDescription
IdformGuidNo
NameformstringNo
LogoTypeformUriNo
CategoryformstringNo
Street1formstringNo
Street2formstringNo
ZipCodeformstringNo
CityformstringNo
CountryIdformstringNo
LongitudeformstringNo
LatitudeformstringNo
PhoneformstringNo
EmailformstringNo
HomePageformstringNo
SitePathformstringNo
IsFavoriteformboolNo
PaymentProviderIdformint?No
BookedCustomer Parameters:
NameParameterData TypeRequiredDescription
IdformGuidNo
FirstnameformstringNo
LastnameformstringNo
EmailformstringNo
PhoneformstringNo
FacebookUserNameformstringNo
ImageUrlformstringNo
BookedQuantity Parameters:
NameParameterData TypeRequiredDescription
IdformintNoThe quantity Id
QuantityformintNoThe quantity for booked on this price category
Priceformdouble?NoThe price
PriceBeforeRebateformdouble?NoThe price bofore rebate codes
CurrencyIdformstringNoThe price currency
PriceSignformstringNoThe price sign
CategoryformstringNoThe price category
VATformdecimal?NoThe price VAT in percent
PriceTextformstringNoThe price text to display
OccupiesSpotformboolNoIf the quantity you add should occupy a spot. Default is true. If no it will only be a row that includes price information.
ServiceInfoResponse Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
NameformstringNo
DescriptionformstringNo
ImageUrlformUriNo
LengthInMinutesformint?No
MaxNumberOfSpotsPerBookingformintNo
GroupBookingformGroupBookingSettingsNo
MultipleResourceformMultipleResourceSettingsNo
IsGroupBookingformboolNo
IsPaymentEnabledformboolNo
GroupBookingSettings Parameters:
NameParameterData TypeRequiredDescription
ActiveformboolNo
MinformintNo
MaxformintNo
MultipleResourceSettings Parameters:
NameParameterData TypeRequiredDescription
ActiveformboolNo
MinformintNo
MaxformintNo
BookingLogQueryResponse Parameters:
NameParameterData TypeRequiredDescription
IdformintNoThe booking log id
BookingIdformintNoThe booking id
EventTypeIdformintNoThe type of event
EventTypeformBookingLogEventTypeResponseNoThe type of event
CommentsformstringNoComments that could be added to the event log item
UserNameformstringNoThe user created the event
CreatedformDateTimeNoThen date when the event occured
BookingLogEventTypeResponse Parameters:
NameParameterData TypeRequiredDescription
IdformintNoThe event type id
NameformstringNoThe event type name
DescriptionformstringNoThe event type description
BookingPaymentLogQueryResponse Parameters:
NameParameterData TypeRequiredDescription
IdformintNoThe booking payment log id
BookingIdformintNoThe booking id
PaymentReferenceIdformstringNoThe payment reference id
OrderItemReferenceIdformstringNoThe payment order item reference id
PaymentProviderIdformint?NoThe payment reference id
AmountformdoubleNoThe payment amount
VATformdecimalNoThe payment VAT in percent
AmountCreditedformdoubleNoThe payment amount that is credited
CurrencyIdformstringNoThe payment currency id
CurrencyInfoformCurrencyInfoResponseNoThe payment currency info
CommentsformstringNoComments that could be added to the event log item
CreatedformDateTimeNoThe date when the payment items was created
UpdatedformDateTimeNoThe date when the payment items was update
CurrencyInfoResponse Parameters:
NameParameterData TypeRequiredDescription
IdformstringNoThe currency id
NameformstringNoThe currency id
CurrencySignformstringNoThe currency id
BookingCheckoutQueryResponse Parameters:
NameParameterData TypeRequiredDescription
IdformGuidNoThe checkout id
BookingIdformintNoThe booking id
PurchaseIdformint?NoThe purchase id
ExpirationTimeformDateTime?NoThe payment checkout expiration datetime
SnippetformstringNoThe payment snippet code
StatusformstringNoThe payment status
MessageformstringNoLog message
CreatedformDateTimeNoWhen the checkout log item was created
UpdatedformDateTimeNoWhen the checkout log item was updated
ExternalReferenceResponse Parameters:
NameParameterData TypeRequiredDescription
CompanyIdformGuidNo
IdformGuidNo
OwnerIdformGuidNo
ReferenceTypeformstringNo
ExternalDataformstringNo
CreatedByformstringNo
UpdatedformDateTimeNo
CreatedformDateTimeNo
BookingCalendarExportStatus Parameters:
NameParameterData TypeRequiredDescription
CalendarIdformstringNo
BookingIdformintNo
Syncedformbool?No

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

DELETE /bookings/deletebycode/{Id} HTTP/1.1 
Host: testapi.bokamera.se 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"Id":0,"Status":"Booked","StatusId":0,"StatusName":"String","StatusInfo":{"Id":0,"Name":"String","Description":"String","Icon":"String","Color":"String"},"SendEmailReminder":false,"SendSmsReminder":false,"SendSmsConfirmation":false,"SendEmailConfirmation":false,"LastTimeToUnBook":"0001-01-01T00:00:00","CustomFields":[{"Id":0,"Name":"String","Description":"String","Width":0,"DataType":"String","DefaultValue":"String","IsMandatory":false,"MandatoryErrorMessage":"String","MaxLength":0,"MultipleLineText":false,"RegEx":"String","RegExErrorMessage":"String","Values":[{"Value":"String"}]}],"CustomFieldValues":[{"Id":0,"Column":"String","Name":"String","Description":"String","Value":"String","DataType":"String"}],"BookedResourceTypes":[{"Id":0,"Name":"String","Resources":[{"Id":0,"Name":"String","Color":"String","Email":"String","MobilePhone":"String","AccessGroup":"String","EmailNotification":false,"SMSNotification":false,"EmailReminder":false,"SMSReminder":false}]}],"Company":{"Name":"String","Category":"String","Street1":"String","Street2":"String","ZipCode":"String","City":"String","CountryId":"String","Longitude":"String","Latitude":"String","Phone":"String","Email":"String","HomePage":"String","SitePath":"String","IsFavorite":false,"PaymentProviderId":0},"Customer":{"Firstname":"String","Lastname":"String","Email":"String","Phone":"String","FacebookUserName":"String","ImageUrl":"String"},"Quantities":[{"Id":0,"Quantity":0,"Price":0,"PriceBeforeRebate":0,"CurrencyId":"String","PriceSign":"String","Category":"String","VAT":0,"PriceText":"String","OccupiesSpot":false}],"Service":{"Id":0,"Name":"String","Description":"String","LengthInMinutes":0,"MaxNumberOfSpotsPerBooking":0,"GroupBooking":{"Active":false,"Min":0,"Max":0},"MultipleResource":{"Active":false,"Min":0,"Max":0},"IsGroupBooking":false,"IsPaymentEnabled":false},"PaymentExpiration":"0001-01-01T00:00:00","Log":[{"Id":0,"BookingId":0,"EventTypeId":0,"EventType":{"Id":0,"Name":"String","Description":"String"},"Comments":"String","UserName":"String"}],"PaymentLog":[{"Id":0,"BookingId":0,"PaymentReferenceId":"String","OrderItemReferenceId":"String","PaymentProviderId":0,"Amount":0,"VAT":0,"AmountCredited":0,"CurrencyId":"String","CurrencyInfo":{"Id":"String","Name":"String","CurrencySign":"String"},"Comments":"String"}],"CheckoutLog":[{"BookingId":0,"PurchaseId":0,"ExpirationTime":"0001-01-01T00:00:00","Snippet":"String","Status":"String","Message":"String"}],"ExternalReference":[{"ReferenceType":"String","ExternalData":"String","CreatedBy":"String"}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"CalendarExportStatus":{"CalendarId":"String","BookingId":0,"Synced":false},"LengthInMinutes":0,"BookedBy":"String","BookedComments":"String","UnbookedComments":"String","CommentsToCustomer":"String","UnbookedOn":"0001-01-01T00:00:00","CancellationCode":"String","RatingCode":"String"}