DELETE | /users/favorite | Remove an company as favorite to the logged in user | Remove an company as favorite to the logged in user. |
---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports BokaMera.API.ServiceModel.Dtos
Imports BokaMera.CodeLock.Model.Api
Namespace Global
Namespace BokaMera.API.ServiceModel.Dtos
Public Partial Class CompanyBookingSettings
Public Overridable Property EnableMobileApp As Boolean
Public Overridable Property BookingReceiptMessage As String
Public Overridable Property ShowFreeTimesLeft As Boolean
Public Overridable Property EnableShowBookedTimes As Boolean
Public Overridable Property BookingAgreement As String
'''<Summary>
'''The settings for how to display week number. 1 = ShowWeekNumberFromDate, 2 = ShowWeekNumberToDate, 3 = ShowWeekNumberFromToDate, 4 = DontShowWeekNumber
'''</Summary>
<ApiMember(DataType:="int", Description:="The settings for how to display week number. 1 = ShowWeekNumberFromDate, 2 = ShowWeekNumberToDate, 3 = ShowWeekNumberFromToDate, 4 = DontShowWeekNumber ")>
Public Overridable Property WeekNumberSetting As Integer
Public Overridable Property ShowBookedTimes As Boolean
'''<Summary>
'''The payment provider id. 1 = Payson Checkout 1.0, 2= Payson Checkout 2.0 ... To get the full payment provider for the company call GET /payment/settings
'''</Summary>
<ApiMember(Description:="The payment provider id. 1 = Payson Checkout 1.0, 2= Payson Checkout 2.0 ... To get the full payment provider for the company call GET /payment/settings")>
Public Overridable Property PaymentProviderId As Integer
'''<Summary>
'''If it's only allowed for existing customers to book
'''</Summary>
<ApiMember(DataType:="boolean", Description:="If it's only allowed for existing customers to book")>
Public Overridable Property BookOnlyOnExistingCustomers As Boolean
'''<Summary>
'''If payment is enabled
'''</Summary>
<ApiMember(DataType:="boolean", Description:="If payment is enabled")>
Public Overridable Property PaymentEnabled As Boolean
End Class
Public Partial Class CompanyQueryResponse
Public Sub New()
Reviews = New List(Of RatingReviewResponse)
CustomerCustomFields = New List(Of CustomFieldConfigData)
End Sub
Public Overridable Property Id As Guid
Public Overridable Property Name As String
'''<Summary>
'''The organisation number will only be visible if your owner to the company
'''</Summary>
<ApiMember(DataType:="string", Description:="The organisation number will only be visible if your owner to the company")>
Public Overridable Property OrganisationNumber As String
'''<Summary>
'''What type of company. If it's used for personal use or as a company.
'''</Summary>
<ApiMember(DataType:="int", Description:="What type of company. If it's used for personal use or as a company.")>
Public Overridable Property TypeId As Nullable(Of Integer)
Public Overridable Property Details As String
Public Overridable Property CategoryId As Integer
Public Overridable Property Category As String
Public Overridable Property LogoType As Uri
Public Overridable Property CoverImage As Uri
Public Overridable Property Street1 As String
Public Overridable Property Street2 As String
Public Overridable Property ZipCode As String
Public Overridable Property City As String
Public Overridable Property CountryId As String
Public Overridable Property Longitude As String
Public Overridable Property Latitude As String
Public Overridable Property Distance As Nullable(Of Double)
Public Overridable Property Phone As String
Public Overridable Property Email As String
Public Overridable Property Homepage As String
Public Overridable Property SitePath As String
Public Overridable Property Active As Boolean
Public Overridable Property CodeLockSystem As Nullable(Of CodeLockSystemType)
Public Overridable Property IsFreeAccount As Boolean
'''<Summary>
'''Will show when the company was updated, note it will only be shown if your logged in as admin for the company.
'''</Summary>
<ApiMember(DataType:="datetime", Description:="Will show when the company was updated, note it will only be shown if your logged in as admin for the company.")>
Public Overridable Property Updated As Nullable(Of Date)
'''<Summary>
'''Will show when the company was created, note it will only be shown if your logged in as admin for the company.
'''</Summary>
<ApiMember(DataType:="datetime", Description:="Will show when the company was created, note it will only be shown if your logged in as admin for the company.")>
Public Overridable Property Created As Nullable(Of Date)
Public Overridable Property StatusId As Integer
'''<Summary>
'''If the company is marked as favourite for the logged in user
'''</Summary>
<ApiMember(DataType:="boolean", Description:="If the company is marked as favourite for the logged in user")>
Public Overridable Property IsFavorite As Boolean
Public Overridable Property BookingAgreements As String
Public Overridable Property BookingSettings As CompanyBookingSettings
Public Overridable Property SystemSettings As CompanySystemSettings
Public Overridable Property WidgetSettings As CompanyWidgetSettings
Public Overridable Property HomepageSettings As HomepageSettingsResponse
Public Overridable Property RatingSummary As CompanyRatingSummary
Public Overridable Property Reviews As List(Of RatingReviewResponse)
Public Overridable Property CustomerCustomFields As List(Of CustomFieldConfigData)
Public Overridable Property ResponseStatus As ResponseStatus
End Class
Public Partial Class CompanyRatingSummary
'''<Summary>
'''The average rating score
'''</Summary>
<ApiMember(Description:="The average rating score")>
Public Overridable Property AverageScore As Double
'''<Summary>
'''The number of ratings of score 1
'''</Summary>
<ApiMember(Description:="The number of ratings of score 1")>
Public Overridable Property RatingScore1Count As Integer
'''<Summary>
'''The number of ratings of score 2
'''</Summary>
<ApiMember(Description:="The number of ratings of score 2")>
Public Overridable Property RatingScore2Count As Integer
'''<Summary>
'''The number of ratings of score 3
'''</Summary>
<ApiMember(Description:="The number of ratings of score 3")>
Public Overridable Property RatingScore3Count As Integer
'''<Summary>
'''The number of ratings of score 4
'''</Summary>
<ApiMember(Description:="The number of ratings of score 4")>
Public Overridable Property RaingScore4Count As Integer
'''<Summary>
'''The number of ratings of score 5
'''</Summary>
<ApiMember(Description:="The number of ratings of score 5")>
Public Overridable Property RatingScore5Count As Integer
'''<Summary>
'''The number of ratings
'''</Summary>
<ApiMember(Description:="The number of ratings")>
Public Overridable Property Count As Integer
End Class
Public Partial Class CompanySystemSettings
'''<Summary>
'''If the booking is active or not
'''</Summary>
<ApiMember(DataType:="bool", Description:="If the booking is active or not")>
Public Overridable Property Active As Boolean
'''<Summary>
'''If the booking is not active, what message to show to the customers
'''</Summary>
<ApiMember(DataType:="string", Description:="If the booking is not active, what message to show to the customers")>
Public Overridable Property InactiveMessage As String
'''<Summary>
'''If the company should be visible in search results on hompage
'''</Summary>
<ApiMember(DataType:="bool", Description:="If the company should be visible in search results on hompage")>
Public Overridable Property Searchable As Boolean
'''<Summary>
'''If you have a google analytics account and want to track your customers behaviors.
'''</Summary>
<ApiMember(DataType:="string", Description:="If you have a google analytics account and want to track your customers behaviors.")>
Public Overridable Property GATrackingId As String
'''<Summary>
'''If you have a google Ads Conversion Id account and want to track your customers behaviors.
'''</Summary>
<ApiMember(DataType:="string", Description:="If you have a google Ads Conversion Id account and want to track your customers behaviors.")>
Public Overridable Property GoogleAdsConversionId As String
'''<Summary>
'''If you have a LinkedIn account and want to track your customers behaviors.
'''</Summary>
<ApiMember(DataType:="string", Description:="If you have a LinkedIn account and want to track your customers behaviors.")>
Public Overridable Property LinkedinTagId As String
'''<Summary>
'''If you have a Google Ads Conversion Label and want to track your customers behaviors.
'''</Summary>
<ApiMember(DataType:="string", Description:="If you have a Google Ads Conversion Label and want to track your customers behaviors.")>
Public Overridable Property GoogleAdsConversionLabel As String
'''<Summary>
'''If you have a google tag manager account and want to track your customers behaviors.
'''</Summary>
<ApiMember(DataType:="string", Description:="If you have a google tag manager account and want to track your customers behaviors.")>
Public Overridable Property GTMTrackingId As String
'''<Summary>
'''If you have a facebook account and want to track your customers behaviors.
'''</Summary>
<ApiMember(DataType:="string", Description:="If you have a facebook account and want to track your customers behaviors.")>
Public Overridable Property FacebookPixelId As String
'''<Summary>
'''If you want your customers to be albe to change language on your homepage
'''</Summary>
<ApiMember(DataType:="bool", Description:="If you want your customers to be albe to change language on your homepage")>
Public Overridable Property MultiLanguage As Boolean
'''<Summary>
'''If the company should be visible on the marketplace
'''</Summary>
<ApiMember(DataType:="bool", Description:="If the company should be visible on the marketplace")>
Public Overridable Property ShowOnMarketplace As Boolean
'''<Summary>
'''If you want your own written text on your homepage to be translated using google analytics when a user changes language
'''</Summary>
<ApiMember(DataType:="bool", Description:="If you want your own written text on your homepage to be translated using google analytics when a user changes language")>
Public Overridable Property EnableAPITranslation As Boolean
'''<Summary>
'''What is the standard language your homepage information is written in. Select from the different countries, ie. SE,NO,EN
'''</Summary>
<ApiMember(DataType:="string", Description:="What is the standard language your homepage information is written in. Select from the different countries, ie. SE,NO,EN")>
Public Overridable Property DefaultLanguage As String
'''<Summary>
'''If you want to allow to send customer information in the tracking events to the external providers. Note you as a company are responsible for informing your customers and handling the data in terms of GDPR.
'''</Summary>
<ApiMember(Description:="If you want to allow to send customer information in the tracking events to the external providers. Note you as a company are responsible for informing your customers and handling the data in terms of GDPR. ")>
Public Overridable Property SendCustomerInformationToExternalProviders As Boolean
End Class
Public Partial Class CompanyWidgetSettings
'''<Summary>
'''The service layouts id.
'''</Summary>
<ApiMember(Description:="The service layouts id.")>
Public Overridable Property ServiceLayoutId As Integer
'''<Summary>
'''The time layouts id.
'''</Summary>
<ApiMember(Description:="The time layouts id.")>
Public Overridable Property TimeLayoutId As Integer
'''<Summary>
'''The booking layouts id.
'''</Summary>
<ApiMember(Description:="The booking layouts id.")>
Public Overridable Property BookingLayoutId As Integer
'''<Summary>
'''The primary color of the booking widget.
'''</Summary>
<ApiMember(Description:="The primary color of the booking widget.")>
Public Overridable Property PrimaryColor As String
'''<Summary>
'''If you should show the service image in the booking widget.
'''</Summary>
<ApiMember(Description:="If you should show the service image in the booking widget.")>
Public Overridable Property ShowServiceImage As Boolean
'''<Summary>
'''If you should show the rebate code field in the booking widget.
'''</Summary>
<ApiMember(Description:="If you should show the rebate code field in the booking widget.")>
Public Overridable Property ShowRebateCodeField As Boolean
'''<Summary>
'''If you should show the next available time in the booking widget.
'''</Summary>
<ApiMember(Description:="If you should show the next available time in the booking widget.")>
Public Overridable Property ShowNextAvailableTime As Boolean
'''<Summary>
'''If you should show the end time in the booking widget.
'''</Summary>
<ApiMember(Description:="If you should show the end time in the booking widget.")>
Public Overridable Property ShowEndTime As Boolean
'''<Summary>
'''What text to show on booked time slots. Default text is Booked
'''</Summary>
<ApiMember(Description:="What text to show on booked time slots. Default text is Booked")>
Public Overridable Property BookedTimeSlotText As String
'''<Summary>
'''If the widget should be displayed in dark theme
'''</Summary>
<ApiMember(Description:="If the widget should be displayed in dark theme")>
Public Overridable Property DarkTheme As Boolean
'''<Summary>
'''If you should show the subscribe to newsletter checkbox in the booking widget.
'''</Summary>
<ApiMember(Description:="If you should show the subscribe to newsletter checkbox in the booking widget.")>
Public Overridable Property ShowSubscribeToNewsletter As Boolean
End Class
Public Partial Class CustomFieldConfigData
Public Sub New()
Values = New List(Of CustomFieldValueResponse)
End Sub
'''<Summary>
'''Custom field id
'''</Summary>
<ApiMember(Description:="Custom field id")>
Public Overridable Property Id As Integer
'''<Summary>
'''Configuration name. Example: 'Number of persons'.
'''</Summary>
<ApiMember(Description:="Configuration name. Example: 'Number of persons'.")>
Public Overridable Property Name As String
'''<Summary>
'''Custom field description. Example: 'For how many persons is this booking?'
'''</Summary>
<ApiMember(Description:="Custom field description. Example: 'For how many persons is this booking?'")>
Public Overridable Property Description As String
'''<Summary>
'''Field width. Example: 20 for 20px
'''</Summary>
<ApiMember(Description:="Field width. Example: 20 for 20px")>
Public Overridable Property Width As Nullable(Of Integer)
'''<Summary>
'''Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox'
'''</Summary>
<ApiMember(Description:="Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox'")>
Public Overridable Property DataType As String
'''<Summary>
'''Default value of the field. Example: '3'
'''</Summary>
<ApiMember(Description:="Default value of the field. Example: '3'")>
Public Overridable Property DefaultValue As String
'''<Summary>
'''Determines if the field is required to have a value or not
'''</Summary>
<ApiMember(Description:="Determines if the field is required to have a value or not")>
Public Overridable Property IsMandatory As Boolean
'''<Summary>
'''Error message shown to the user if the field data is required but not entered
'''</Summary>
<ApiMember(Description:="Error message shown to the user if the field data is required but not entered")>
Public Overridable Property MandatoryErrorMessage As String
'''<Summary>
'''Max lenght of the field
'''</Summary>
<ApiMember(Description:="Max lenght of the field")>
Public Overridable Property MaxLength As Integer
'''<Summary>
'''If the field should have multiple lines
'''</Summary>
<ApiMember(Description:="If the field should have multiple lines")>
Public Overridable Property MultipleLineText As Boolean
'''<Summary>
'''Regular expression used for validation of the field
'''</Summary>
<ApiMember(Description:="Regular expression used for validation of the field")>
Public Overridable Property RegEx As String
'''<Summary>
'''Error message shown if the regular expression validation failed
'''</Summary>
<ApiMember(Description:="Error message shown if the regular expression validation failed")>
Public Overridable Property RegExErrorMessage As String
'''<Summary>
'''The values to select from if Datatype is DropDown for this custom field
'''</Summary>
<ApiMember(Description:="The values to select from if Datatype is DropDown for this custom field")>
Public Overridable Property Values As List(Of CustomFieldValueResponse)
End Class
Public Partial Class CustomFieldValueResponse
Public Overridable Property Value As String
End Class
<ValidateRequest(Validator:="IsAuthenticated")>
<ApiResponse(Description:="You were unauthorized to call this service", StatusCode:=401)>
<ApiResponse(Description:="You have too low privilegies to call this service", StatusCode:=403)>
Public Partial Class DeleteFavorite
'''<Summary>
'''Id of the company
'''</Summary>
<ApiMember(Description:="Id of the company", IsRequired:=true, ParameterType:="path")>
Public Overridable Property CompanyId As Guid
End Class
Public Partial Class HomepageSettingsResponse
'''<Summary>
'''The text for homepage heading
'''</Summary>
<ApiMember(Description:="The text for homepage heading")>
Public Overridable Property HomepageHeading As String
'''<Summary>
'''The text for homepage startpage heading
'''</Summary>
<ApiMember(Description:="The text for homepage startpage heading")>
Public Overridable Property WelcomePageHeading As String
'''<Summary>
'''The text for homepage startpage body
'''</Summary>
<ApiMember(Description:="The text for homepage startpage body")>
Public Overridable Property WelcomePageBody As String
'''<Summary>
'''The text for homepage about us page heading
'''</Summary>
<ApiMember(Description:="The text for homepage about us page heading")>
Public Overridable Property AboutUsPageHeading As String
'''<Summary>
'''The text for homepage about us page body
'''</Summary>
<ApiMember(Description:="The text for homepage about us page body")>
Public Overridable Property AboutUsPageBody As String
'''<Summary>
'''The startpage image url
'''</Summary>
<ApiMember(Description:="The startpage image url")>
Public Overridable Property ImageUrl As Uri
'''<Summary>
'''The cover image url
'''</Summary>
<ApiMember(Description:="The cover image url")>
Public Overridable Property CoverImage As Uri
'''<Summary>
'''Show rating on the page
'''</Summary>
<ApiMember(Description:="Show rating on the page")>
Public Overridable Property ShowRating As Boolean
'''<Summary>
'''The template for the homepage
'''</Summary>
<ApiMember(Description:="The template for the homepage")>
Public Overridable Property HomePageTemplateId As Integer
'''<Summary>
'''The hero section style for the homepage
'''</Summary>
<ApiMember(Description:="The hero section style for the homepage")>
Public Overridable Property HeroSectionStyleId As Integer
'''<Summary>
'''Enable the BokaMera Homepage
'''</Summary>
<ApiMember(Description:="Enable the BokaMera Homepage")>
Public Overridable Property EnableHomepage As Boolean
End Class
Public Partial Class RatingReviewResponse
'''<Summary>
'''The title for the review
'''</Summary>
<ApiMember(Description:="The title for the review")>
Public Overridable Property Title As String
'''<Summary>
'''The description for the review
'''</Summary>
<ApiMember(Description:="The description for the review")>
Public Overridable Property Description As String
'''<Summary>
'''The rating score
'''</Summary>
<ApiMember(Description:="The rating score")>
Public Overridable Property RatingScore As Integer
'''<Summary>
'''The review author
'''</Summary>
<ApiMember(Description:="The review author")>
Public Overridable Property Author As String
'''<Summary>
'''The created date
'''</Summary>
<ApiMember(Description:="The created date")>
Public Overridable Property Created As Date
'''<Summary>
'''The review answer from the company
'''</Summary>
<ApiMember(Description:="The review answer from the company")>
Public Overridable Property ReviewAnswer As String
End Class
Public Partial Class UserFavorites
Public Overridable Property CompanyId As Guid
Public Overridable Property Company As CompanyQueryResponse
End Class
End Namespace
Namespace BokaMera.CodeLock.Model.Api
Public Enum CodeLockSystemType
Sample
RcoM5
AxemaVaka
VanderbiltOmnis
ParakeyParakey
AmidoDax
TelkeyTelkey
TechSolutionsSiedle
Accessy
Zesec
Enabla
End Enum
End Namespace
End Namespace
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.
DELETE /users/favorite HTTP/1.1 Host: api.bokamera.se Accept: text/jsv
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { Company: { Name: String, OrganisationNumber: String, TypeId: 0, Details: String, CategoryId: 0, Category: String, Street1: String, Street2: String, ZipCode: String, City: String, CountryId: String, Longitude: String, Latitude: String, Distance: 0, Phone: String, Email: String, Homepage: String, SitePath: String, Active: False, CodeLockSystem: Sample, IsFreeAccount: False, Updated: "0001-01-01T00:00:00", Created: "0001-01-01T00:00:00", StatusId: 0, IsFavorite: False, BookingAgreements: String, BookingSettings: { EnableMobileApp: False, BookingReceiptMessage: String, ShowFreeTimesLeft: False, EnableShowBookedTimes: False, BookingAgreement: String, WeekNumberSetting: 0, ShowBookedTimes: False, PaymentProviderId: 0, BookOnlyOnExistingCustomers: False, PaymentEnabled: False }, SystemSettings: { Active: False, InactiveMessage: String, Searchable: False, GATrackingId: String, GoogleAdsConversionId: String, LinkedinTagId: String, GoogleAdsConversionLabel: String, GTMTrackingId: String, FacebookPixelId: String, MultiLanguage: False, ShowOnMarketplace: False, EnableAPITranslation: False, DefaultLanguage: String, SendCustomerInformationToExternalProviders: False }, WidgetSettings: { ServiceLayoutId: 0, TimeLayoutId: 0, BookingLayoutId: 0, PrimaryColor: String, ShowServiceImage: False, ShowRebateCodeField: False, ShowNextAvailableTime: False, ShowEndTime: False, BookedTimeSlotText: String, DarkTheme: False, ShowSubscribeToNewsletter: False }, HomepageSettings: { HomepageHeading: String, WelcomePageHeading: String, WelcomePageBody: String, AboutUsPageHeading: String, AboutUsPageBody: String, ShowRating: False, HomePageTemplateId: 0, HeroSectionStyleId: 0, EnableHomepage: False }, RatingSummary: { AverageScore: 0, RatingScore1Count: 0, RatingScore2Count: 0, RatingScore3Count: 0, RaingScore4Count: 0, RatingScore5Count: 0, Count: 0 }, Reviews: [ { Title: String, Description: String, RatingScore: 0, Author: String, ReviewAnswer: String } ], CustomerCustomFields: [ { "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" } ] } ], ResponseStatus: { ErrorCode: String, Message: String, StackTrace: String, Errors: [ { ErrorCode: String, FieldName: String, Message: String, Meta: { String: String } } ], Meta: { String: String } } } }