BokaMera.API.Host

<back to all web services

AddResourceToBooking

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
POST/bookings/{Id}/resourceAdd a resource to a bookingUpdates an existing booking with a new resource that must be available (not booked or occupied).
AddResourceToBooking Parameters:
NameParameterData TypeRequiredDescription
CompanyIdbodyGuid?NoThe company id, if empty will use the company id for the user you are logged in with.
Idpathint?YesId of the booking
ResourceTypeIdbodyintNoThe resource type id
ResourceIdbodyintNoThe resource id
BookingQueryResponse Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
CompanyIdformGuidNo
FromformDateTimeNo
ToformDateTimeNo
StatusformBookingStatusEnumNo
StatusIdformintNo
StatusNameformstringYes
StatusInfoformBookingStatusQueryResponseYes
SendEmailReminderformboolNo
SendSmsReminderformboolNo
SendSmsConfirmationformboolNo
SendEmailConfirmationformboolNo
LastTimeToUnBookformDateTime?No
CustomFieldsformList<CustomFieldConfigData>Yes
CustomFieldValuesformList<CustomFieldDataResponse>Yes
BookedResourceTypesformList<BookedResourceType>Yes
CompanyformBookedCompanyYes
CustomerformBookedCustomerYes
QuantitiesformList<BookedQuantity>Yes
ServiceformServiceInfoResponseYes
InvoiceAddressformInvoiceAddressResponseYes
PaymentExpirationformDateTime?No
LogformList<BookingLogQueryResponse>Yes
PaymentLogformList<BookingPaymentLogQueryResponse>Yes
CheckoutLogformList<BookingCheckoutQueryResponse>Yes
ExternalReferenceformList<ExternalReferenceResponse>Yes
ResponseStatusformResponseStatusYes
LengthInMinutesformint?No
BookedByformstringYes
BookedCommentsformstringYes
UnbookedCommentsformstringYes
CommentsToCustomerformstringYes
CreatedDateformDateTimeNo
UpdatedDateformDateTimeNo
UnbookedOnformDateTime?No
CancellationCodeformstringYes
RatingCodeformstringYes
BookingStatusEnum Enum:
NameValue
Booked1
Unbooked2
Reserved3
Canceled4
AwaitingPayment5
AwaitingPaymentNoTimeLimit6
Payed7
AwaitingPaymentRequestFromAdmin8
AwaitingPaymentFromProvider9
Invoiced10
BookingStatusQueryResponse Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
NameformstringYes
DescriptionformstringYes
IconformstringYes
ColorformstringYes
CustomFieldConfigData Parameters:
NameParameterData TypeRequiredDescription
IdformintNoCustom field id
NameformstringYesConfiguration name. Example: 'Number of persons'.
DescriptionformstringYesCustom field description. Example: 'For how many persons is this booking?'
Widthformint?NoField width. Example: 20 for 20px
DataTypeformstringYesData field of custom field. Valid values are: TextBox, ... Example: 'TextBox'
DefaultValueformstringYesDefault value of the field. Example: '3'
IsMandatoryformboolNoDetermines if the field is required to have a value or not
MandatoryErrorMessageformstringYesError 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
RegExformstringYesRegular expression used for validation of the field
RegExErrorMessageformstringYesError message shown if the regular expression validation failed
ValuesformList<CustomFieldValueResponse>YesThe values to select from if Datatype is DropDown for this custom field
CustomFieldValueResponse Parameters:
NameParameterData TypeRequiredDescription
ValueformstringYes
CustomFieldDataResponse Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
ColumnformstringYes
NameformstringYes
DescriptionformstringYes
ValueformstringYes
DataTypeformstringYesData field of custom field. Valid values are: TextBox, ... Example: 'TextBox'
BookedResourceType Parameters:
NameParameterData TypeRequiredDescription
IdformintNoThe resource type id
NameformstringYesThe resource type name
ResourcesformList<BookedResource>YesThe resources inside resource type
BookedResource Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
NameformstringYes
ColorformstringYes
ImageUrlformUriYes
EmailformstringYes
MobilePhoneformstringYes
AccessGroupformstringYes
EmailNotificationformboolNo
SMSNotificationformboolNo
EmailReminderformboolNo
SMSReminderformboolNo
BookedCompany Parameters:
NameParameterData TypeRequiredDescription
IdformGuidNo
NameformstringYes
LogoTypeformUriYes
CategoryformstringYes
Street1formstringYes
Street2formstringYes
ZipCodeformstringYes
CityformstringYes
CountryIdformstringYes
LongitudeformstringYes
LatitudeformstringYes
PhoneformstringYes
EmailformstringYes
HomePageformstringYes
SitePathformstringYes
IsFavoriteformboolNo
PaymentProviderIdformint?No
BookedCustomer Parameters:
NameParameterData TypeRequiredDescription
IdformGuidNo
FirstnameformstringYes
LastnameformstringYes
EmailformstringYes
PhoneformstringYes
FacebookUserNameformstringYes
ImageUrlformstringYes
CorporateIdentityNumberformstringYes
InvoiceAddress1formstringYes
InvoiceAddress2formstringYes
InvoiceCityformstringYes
InvoicePostalCodeformstringYes
InvoiceCountryCodeformstringYes
BookedQuantity Parameters:
NameParameterData TypeRequiredDescription
IdformintNoThe quantity Id
QuantityformintNoThe quantity for booked on this price category
Priceformdouble?NoThe price
PriceBeforeRebateformdouble?NoThe price bofore rebate codes
CurrencyIdformstringYesThe price currency
PriceSignformstringYesThe price sign
CategoryformstringYesThe price category
VATformdecimal?NoThe price VAT in percent
PriceTextformstringYesThe 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
NameformstringYes
DescriptionformstringYes
ImageUrlformUriYes
LengthInMinutesformint?No
MaxNumberOfSpotsPerBookingformintNo
MinNumberOfSpotsPerBookingformintNo
GroupBookingformGroupBookingSettingsYes
MultipleResourceformMultipleResourceSettingsYes
IsGroupBookingformboolNo
IsPaymentEnabledformboolNo
GroupBookingSettings Parameters:
NameParameterData TypeRequiredDescription
ActiveformboolNo
MinformintNo
MaxformintNo
MultipleResourceSettings Parameters:
NameParameterData TypeRequiredDescription
ActiveformboolNo
MinformintNo
MaxformintNo
InvoiceAddressResponse Parameters:
NameParameterData TypeRequiredDescription
InvoiceAddressIdformGuidNo
UserIdformGuid?No
CorporateIdentityNumberformstringYes
InvoiceAddress1formstringYes
InvoiceAddress2formstringYes
InvoiceCityformstringYes
InvoicePostalCodeformstringYes
InvoiceCountryCodeformstringYes
BookingLogQueryResponse Parameters:
NameParameterData TypeRequiredDescription
IdformintNoThe booking log id
BookingIdformintNoThe booking id
EventTypeIdformintNoThe type of event
EventTypeformBookingLogEventTypeResponseYesThe type of event
CommentsformstringYesComments that could be added to the event log item
UserNameformstringYesThe user created the event
CreatedformDateTimeNoThe date when the event occurred
BookingLogEventTypeResponse Parameters:
NameParameterData TypeRequiredDescription
IdformintNoThe event type id
NameformstringYesThe event type name
DescriptionformstringYesThe event type description
BookingPaymentLogQueryResponse Parameters:
NameParameterData TypeRequiredDescription
IdformintNoThe booking payment log id
BookingIdformintNoThe booking id
PaymentReferenceIdformstringYesThe payment reference id
OrderItemReferenceIdformstringYesThe payment order item reference id
PaymentProviderIdformint?NoThe payment reference id
AmountformdoubleNoThe payment amount
VATformdecimalNoThe payment VAT in percent
AmountCreditedformdoubleNoThe payment amount that is credited
CurrencyIdformstringYesThe payment currency id
CurrencyInfoformCurrencyInfoResponseYesThe payment currency info
CommentsformstringYesComments that could be added to the event log item
CreatedformDateTimeNoThe date when the payment items was created
UpdatedformDateTimeNoThe date when the payment items were updated.
CurrencyInfoResponse Parameters:
NameParameterData TypeRequiredDescription
IdformstringYesThe currency id
NameformstringYesThe currency id
CurrencySignformstringYesThe currency id
BookingCheckoutQueryResponse Parameters:
NameParameterData TypeRequiredDescription
IdformGuidNoThe checkout id
BookingIdformintNoThe booking id
PurchaseIdformint?NoThe purchase id
ExpirationTimeformDateTime?NoThe payment checkout expiration datetime
SnippetformstringYesThe payment snippet code
StatusformstringYesThe payment status
MessageformstringYesLog message
CreatedformDateTimeNoWhen the checkout log item was created
UpdatedformDateTimeNoWhen the checkout log item was updated
ExternalReferenceResponse Parameters:
NameParameterData TypeRequiredDescription
CompanyIdformGuidNo
IdformGuidNo
OwnerIdformGuidNo
ReferenceTypeformstringYes
ExternalDataformstringYes
CreatedByformstringYes
UpdatedformDateTimeNo
CreatedformDateTimeNo

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.

POST /bookings/{Id}/resource HTTP/1.1 
Host: testapi.bokamera.se 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"CompanyId":"00000000-0000-0000-0000-000000000000","Id":0,"ResourceTypeId":0,"ResourceId":0}
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","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},"InvoiceAddress":{"UserId":"00000000-0000-0000-0000-000000000000","CorporateIdentityNumber":"String","InvoiceAddress1":"String","InvoiceAddress2":"String","InvoiceCity":"String","InvoicePostalCode":"String","InvoiceCountryCode":"String"},"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"}},"LengthInMinutes":0,"BookedBy":"String","BookedComments":"String","UnbookedComments":"String","CommentsToCustomer":"String","UnbookedOn":"0001-01-01T00:00:00","CancellationCode":"String","RatingCode":"String"}