BokaMera.API.Host

<back to all web services

AddFavorite

Requires Authentication
The following routes are available for this service:
POST/users/favoriteAdd an company as favorite to the logged in userAdd an company as favorite to the logged in user.
import java.math.*
import java.util.*
import net.servicestack.client.*


@ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
// @ApiResponse(Description="You have too low privilegies to call this service", StatusCode=403)
@ValidateRequest(Validator="IsAuthenticated")
open class AddFavorite
{
    /**
    * Id of the company
    */
    @ApiMember(Description="Id of the company", IsRequired=true, ParameterType="path")
    var CompanyId:UUID? = null
}

open class UserFavorites
{
    var CompanyId:UUID? = null
    var Company:CompanyQueryResponse? = null
}

open class CompanyQueryResponse
{
    var Id:UUID? = null
    var Name:String? = null
    /**
    * The organisation number will only be visible if your owner to the company
    */
    @ApiMember(DataType="string", Description="The organisation number will only be visible if your owner to the company")
    var OrganisationNumber:String? = null

    /**
    * What type of company. If it's used for personal use or as a company.
    */
    @ApiMember(DataType="int", Description="What type of company. If it's used for personal use or as a company.")
    var TypeId:Int? = null

    var Details:String? = null
    var CategoryId:Int? = null
    var Category:String? = null
    var LogoType:Uri? = null
    var CoverImage:Uri? = null
    var Street1:String? = null
    var Street2:String? = null
    var ZipCode:String? = null
    var City:String? = null
    var CountryId:String? = null
    var Longitude:String? = null
    var Latitude:String? = null
    var Distance:Double? = null
    var Phone:String? = null
    var Email:String? = null
    var Homepage:String? = null
    var SitePath:String? = null
    var Active:Boolean? = null
    var CodeLockSystem:CodeLockSystemType? = null
    var IsFreeAccount:Boolean? = null
    /**
    * Will show when the company was updated, note it will only be shown if your logged in as admin for the company.
    */
    @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.")
    var Updated:Date? = null

    /**
    * Will show when the company was created, note it will only be shown if your logged in as admin for the company.
    */
    @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.")
    var Created:Date? = null

    var StatusId:Int? = null
    /**
    * If the company is marked as favourite for the logged in user
    */
    @ApiMember(DataType="boolean", Description="If the company is marked as favourite for the logged in user")
    var IsFavorite:Boolean? = null

    var BookingAgreements:String? = null
    var BookingSettings:CompanyBookingSettings? = null
    var SystemSettings:CompanySystemSettings? = null
    var WidgetSettings:CompanyWidgetSettings? = null
    var HomepageSettings:HomepageSettingsResponse? = null
    var RatingSummary:CompanyRatingSummary? = null
    var Reviews:ArrayList<RatingReviewResponse> = ArrayList<RatingReviewResponse>()
    var CustomerCustomFields:ArrayList<CustomFieldConfigData> = ArrayList<CustomFieldConfigData>()
    var ResponseStatus:ResponseStatus? = null
}

enum class CodeLockSystemType
{
    Sample,
    RcoM5,
    AxemaVaka,
    VanderbiltOmnis,
    ParakeyParakey,
    AmidoDax,
    TelkeyTelkey,
    TechSolutionsSiedle,
    Accessy,
    Zesec,
    Enabla,
}

open class CompanyBookingSettings
{
    var EnableMobileApp:Boolean? = null
    var BookingReceiptMessage:String? = null
    var ShowFreeTimesLeft:Boolean? = null
    var EnableShowBookedTimes:Boolean? = null
    var BookingAgreement:String? = null
    /**
    * The settings for how to display week number. 1 = ShowWeekNumberFromDate, 2 = ShowWeekNumberToDate, 3 = ShowWeekNumberFromToDate, 4 = DontShowWeekNumber  
    */
    @ApiMember(DataType="int", Description="The settings for how to display week number. 1 = ShowWeekNumberFromDate, 2 = ShowWeekNumberToDate, 3 = ShowWeekNumberFromToDate, 4 = DontShowWeekNumber  ")
    var WeekNumberSetting:Int? = null

    var ShowBookedTimes:Boolean? = null
    /**
    * 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
    */
    @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")
    var PaymentProviderId:Int? = null

    /**
    * If it's only allowed for existing customers to book
    */
    @ApiMember(DataType="boolean", Description="If it's only allowed for existing customers to book")
    var BookOnlyOnExistingCustomers:Boolean? = null

    /**
    * If payment is enabled
    */
    @ApiMember(DataType="boolean", Description="If payment is enabled")
    var PaymentEnabled:Boolean? = null
}

open class CompanySystemSettings
{
    /**
    * If the booking is active or not
    */
    @ApiMember(DataType="bool", Description="If the booking is active or not")
    var Active:Boolean? = null

    /**
    * If the booking is not active, what message to show to the customers
    */
    @ApiMember(DataType="string", Description="If the booking is not active, what message to show to the customers")
    var InactiveMessage:String? = null

    /**
    * If the company should be visible in search results on hompage
    */
    @ApiMember(DataType="bool", Description="If the company should be visible in search results on hompage")
    var Searchable:Boolean? = null

    /**
    * If you have a google analytics account and want to track your customers behaviors.
    */
    @ApiMember(DataType="string", Description="If you have a google analytics account and want to track your customers behaviors.")
    var GATrackingId:String? = null

    /**
    * If you have a google Ads Conversion Id account and want to track your customers behaviors.
    */
    @ApiMember(DataType="string", Description="If you have a google Ads Conversion Id account and want to track your customers behaviors.")
    var GoogleAdsConversionId:String? = null

    /**
    * If you have a LinkedIn account and want to track your customers behaviors.
    */
    @ApiMember(DataType="string", Description="If you have a LinkedIn account and want to track your customers behaviors.")
    var LinkedinTagId:String? = null

    /**
    * If you have a Google Ads Conversion Label and want to track your customers behaviors.
    */
    @ApiMember(DataType="string", Description="If you have a Google Ads Conversion Label and want to track your customers behaviors.")
    var GoogleAdsConversionLabel:String? = null

    /**
    * If you have a google tag manager account and want to track your customers behaviors.
    */
    @ApiMember(DataType="string", Description="If you have a google tag manager account and want to track your customers behaviors.")
    var GTMTrackingId:String? = null

    /**
    * If you have a facebook account and want to track your customers behaviors.
    */
    @ApiMember(DataType="string", Description="If you have a facebook account and want to track your customers behaviors.")
    var FacebookPixelId:String? = null

    /**
    * If you want your customers to be albe to change language on your homepage
    */
    @ApiMember(DataType="bool", Description="If you want your customers to be albe to change language on your homepage")
    var MultiLanguage:Boolean? = null

    /**
    * If the company should be visible on the marketplace
    */
    @ApiMember(DataType="bool", Description="If the company should be visible on the marketplace")
    var ShowOnMarketplace:Boolean? = null

    /**
    * If you want your own written text on your homepage to be translated using google analytics when a user changes language
    */
    @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")
    var EnableAPITranslation:Boolean? = null

    /**
    * What is the standard language your homepage information is written in. Select from the different countries, ie. SE,NO,EN
    */
    @ApiMember(DataType="string", Description="What is the standard language your homepage information is written in. Select from the different countries, ie. SE,NO,EN")
    var DefaultLanguage:String? = null

    /**
    * 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. 
    */
    @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. ")
    var SendCustomerInformationToExternalProviders:Boolean? = null
}

open class CompanyWidgetSettings
{
    /**
    * The service layouts id.
    */
    @ApiMember(Description="The service layouts id.")
    var ServiceLayoutId:Int? = null

    /**
    * The time layouts id.
    */
    @ApiMember(Description="The time layouts id.")
    var TimeLayoutId:Int? = null

    /**
    * The booking layouts id.
    */
    @ApiMember(Description="The booking layouts id.")
    var BookingLayoutId:Int? = null

    /**
    * The primary color of the booking widget.
    */
    @ApiMember(Description="The primary color of the booking widget.")
    var PrimaryColor:String? = null

    /**
    * If you should show the service image in the booking widget.
    */
    @ApiMember(Description="If you should show the service image in the booking widget.")
    var ShowServiceImage:Boolean? = null

    /**
    * If you should show the rebate code field in the booking widget.
    */
    @ApiMember(Description="If you should show the rebate code field in the booking widget.")
    var ShowRebateCodeField:Boolean? = null

    /**
    * If you should show the next available time in the booking widget.
    */
    @ApiMember(Description="If you should show the next available time in the booking widget.")
    var ShowNextAvailableTime:Boolean? = null

    /**
    * If you should show the end time in the booking widget.
    */
    @ApiMember(Description="If you should show the end time in the booking widget.")
    var ShowEndTime:Boolean? = null

    /**
    * What text to show on booked time slots. Default text is Booked
    */
    @ApiMember(Description="What text to show on booked time slots. Default text is Booked")
    var BookedTimeSlotText:String? = null

    /**
    * If the widget should be displayed in dark theme
    */
    @ApiMember(Description="If the widget should be displayed in dark theme")
    var DarkTheme:Boolean? = null

    /**
    * If you should show the subscribe to newsletter checkbox in the booking widget.
    */
    @ApiMember(Description="If you should show the subscribe to newsletter checkbox in the booking widget.")
    var ShowSubscribeToNewsletter:Boolean? = null
}

open class HomepageSettingsResponse
{
    /**
    * The text for homepage heading
    */
    @ApiMember(Description="The text for homepage heading")
    var HomepageHeading:String? = null

    /**
    * The text for homepage startpage heading
    */
    @ApiMember(Description="The text for homepage startpage heading")
    var WelcomePageHeading:String? = null

    /**
    * The text for homepage startpage body
    */
    @ApiMember(Description="The text for homepage startpage body")
    var WelcomePageBody:String? = null

    /**
    * The text for homepage about us page heading
    */
    @ApiMember(Description="The text for homepage about us page heading")
    var AboutUsPageHeading:String? = null

    /**
    * The text for homepage about us page body
    */
    @ApiMember(Description="The text for homepage about us page body")
    var AboutUsPageBody:String? = null

    /**
    * The startpage image url
    */
    @ApiMember(Description="The startpage image url")
    var ImageUrl:Uri? = null

    /**
    * The cover image url
    */
    @ApiMember(Description="The cover image url")
    var CoverImage:Uri? = null

    /**
    * Show rating on the page
    */
    @ApiMember(Description="Show rating on the page")
    var ShowRating:Boolean? = null

    /**
    * The template for the homepage
    */
    @ApiMember(Description="The template for the homepage")
    var HomePageTemplateId:Int? = null

    /**
    * The hero section style for the homepage
    */
    @ApiMember(Description="The hero section style for the homepage")
    var HeroSectionStyleId:Int? = null

    /**
    * Enable the BokaMera Homepage
    */
    @ApiMember(Description="Enable the BokaMera Homepage")
    var EnableHomepage:Boolean? = null
}

open class CompanyRatingSummary
{
    /**
    * The average rating score
    */
    @ApiMember(Description="The average rating score")
    var AverageScore:Double? = null

    /**
    * The number of ratings of score 1
    */
    @ApiMember(Description="The number of ratings of score 1")
    var RatingScore1Count:Int? = null

    /**
    * The number of ratings of score 2
    */
    @ApiMember(Description="The number of ratings of score 2")
    var RatingScore2Count:Int? = null

    /**
    * The number of ratings of score 3
    */
    @ApiMember(Description="The number of ratings of score 3")
    var RatingScore3Count:Int? = null

    /**
    * The number of ratings of score 4
    */
    @ApiMember(Description="The number of ratings of score 4")
    var RaingScore4Count:Int? = null

    /**
    * The number of ratings of score 5
    */
    @ApiMember(Description="The number of ratings of score 5")
    var RatingScore5Count:Int? = null

    /**
    * The number of ratings
    */
    @ApiMember(Description="The number of ratings")
    var Count:Int? = null
}

open class RatingReviewResponse
{
    /**
    * The title for the review
    */
    @ApiMember(Description="The title for the review")
    var Title:String? = null

    /**
    * The description for the review
    */
    @ApiMember(Description="The description for the review")
    var Description:String? = null

    /**
    * The rating score
    */
    @ApiMember(Description="The rating score")
    var RatingScore:Int? = null

    /**
    * The review author
    */
    @ApiMember(Description="The review author")
    var Author:String? = null

    /**
    * The created date
    */
    @ApiMember(Description="The created date")
    var Created:Date? = null

    /**
    * The review answer from the company
    */
    @ApiMember(Description="The review answer from the company")
    var ReviewAnswer:String? = null
}

open class CustomFieldConfigData
{
    /**
    * Custom field id
    */
    @ApiMember(Description="Custom field id")
    var Id:Int? = null

    /**
    * Configuration name. Example: 'Number of persons'.
    */
    @ApiMember(Description="Configuration name. Example: 'Number of persons'.")
    var Name:String? = null

    /**
    * Custom field description. Example: 'For how many persons is this booking?'
    */
    @ApiMember(Description="Custom field description. Example: 'For how many persons is this booking?'")
    var Description:String? = null

    /**
    * Field width. Example: 20 for 20px
    */
    @ApiMember(Description="Field width. Example: 20 for 20px")
    var Width:Int? = null

    /**
    * Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox'
    */
    @ApiMember(Description="Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox'")
    var DataType:String? = null

    /**
    * Default value of the field. Example: '3'
    */
    @ApiMember(Description="Default value of the field. Example: '3'")
    var DefaultValue:String? = null

    /**
    * Determines if the field is required to have a value or not
    */
    @ApiMember(Description="Determines if the field is required to have a value or not")
    var IsMandatory:Boolean? = null

    /**
    * Error message shown to the user if the field data is required but not entered
    */
    @ApiMember(Description="Error message shown to the user if the field data is required but not entered")
    var MandatoryErrorMessage:String? = null

    /**
    * Max lenght of the field
    */
    @ApiMember(Description="Max lenght of the field")
    var MaxLength:Int? = null

    /**
    * If the field should have multiple lines
    */
    @ApiMember(Description="If the field should have multiple lines")
    var MultipleLineText:Boolean? = null

    /**
    * Regular expression used for validation of the field
    */
    @ApiMember(Description="Regular expression used for validation of the field")
    var RegEx:String? = null

    /**
    * Error message shown if the regular expression validation failed
    */
    @ApiMember(Description="Error message shown if the regular expression validation failed")
    var RegExErrorMessage:String? = null

    /**
    * The values to select from if Datatype is DropDown for this custom field
    */
    @ApiMember(Description="The values to select from if Datatype is DropDown for this custom field")
    var Values:ArrayList<CustomFieldValueResponse> = ArrayList<CustomFieldValueResponse>()
}

open class CustomFieldValueResponse
{
    var Value:String? = null
}

Kotlin AddFavorite DTOs

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

HTTP + XML

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

POST /users/favorite HTTP/1.1 
Host: api.bokamera.se 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<AddFavorite xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
</AddFavorite>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<UserFavorites xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <Company>
    <Active>false</Active>
    <BookingAgreements>String</BookingAgreements>
    <BookingSettings>
      <BookOnlyOnExistingCustomers>false</BookOnlyOnExistingCustomers>
      <BookingAgreement>String</BookingAgreement>
      <BookingReceiptMessage>String</BookingReceiptMessage>
      <EnableMobileApp>false</EnableMobileApp>
      <EnableShowBookedTimes>false</EnableShowBookedTimes>
      <PaymentEnabled>false</PaymentEnabled>
      <PaymentProviderId>0</PaymentProviderId>
      <ShowBookedTimes>false</ShowBookedTimes>
      <ShowFreeTimesLeft>false</ShowFreeTimesLeft>
      <WeekNumberSetting>0</WeekNumberSetting>
    </BookingSettings>
    <Category>String</Category>
    <CategoryId>0</CategoryId>
    <City>String</City>
    <CodeLockSystem>Sample</CodeLockSystem>
    <CountryId>String</CountryId>
    <CoverImage i:nil="true" />
    <Created>0001-01-01T00:00:00</Created>
    <CustomerCustomFields>
      <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>
    </CustomerCustomFields>
    <Details>String</Details>
    <Distance>0</Distance>
    <Email>String</Email>
    <Homepage>String</Homepage>
    <HomepageSettings>
      <AboutUsPageBody>String</AboutUsPageBody>
      <AboutUsPageHeading>String</AboutUsPageHeading>
      <CoverImage i:nil="true" />
      <EnableHomepage>false</EnableHomepage>
      <HeroSectionStyleId>0</HeroSectionStyleId>
      <HomePageTemplateId>0</HomePageTemplateId>
      <HomepageHeading>String</HomepageHeading>
      <ImageUrl i:nil="true" />
      <ShowRating>false</ShowRating>
      <WelcomePageBody>String</WelcomePageBody>
      <WelcomePageHeading>String</WelcomePageHeading>
    </HomepageSettings>
    <Id>00000000-0000-0000-0000-000000000000</Id>
    <IsFavorite>false</IsFavorite>
    <IsFreeAccount>false</IsFreeAccount>
    <Latitude>String</Latitude>
    <LogoType i:nil="true" />
    <Longitude>String</Longitude>
    <Name>String</Name>
    <OrganisationNumber>String</OrganisationNumber>
    <Phone>String</Phone>
    <RatingSummary>
      <AverageScore>0</AverageScore>
      <Count>0</Count>
      <RaingScore4Count>0</RaingScore4Count>
      <RatingScore1Count>0</RatingScore1Count>
      <RatingScore2Count>0</RatingScore2Count>
      <RatingScore3Count>0</RatingScore3Count>
      <RatingScore5Count>0</RatingScore5Count>
    </RatingSummary>
    <ResponseStatus xmlns:d3p1="http://schemas.servicestack.net/types">
      <d3p1:ErrorCode>String</d3p1:ErrorCode>
      <d3p1:Message>String</d3p1:Message>
      <d3p1:StackTrace>String</d3p1:StackTrace>
      <d3p1:Errors>
        <d3p1:ResponseError>
          <d3p1:ErrorCode>String</d3p1:ErrorCode>
          <d3p1:FieldName>String</d3p1:FieldName>
          <d3p1:Message>String</d3p1:Message>
          <d3p1:Meta xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
            <d6p1:KeyValueOfstringstring>
              <d6p1:Key>String</d6p1:Key>
              <d6p1:Value>String</d6p1:Value>
            </d6p1:KeyValueOfstringstring>
          </d3p1:Meta>
        </d3p1:ResponseError>
      </d3p1:Errors>
      <d3p1:Meta xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:KeyValueOfstringstring>
          <d4p1:Key>String</d4p1:Key>
          <d4p1:Value>String</d4p1:Value>
        </d4p1:KeyValueOfstringstring>
      </d3p1:Meta>
    </ResponseStatus>
    <Reviews>
      <RatingReviewResponse>
        <Author>String</Author>
        <Created>0001-01-01T00:00:00</Created>
        <Description>String</Description>
        <RatingScore>0</RatingScore>
        <ReviewAnswer>String</ReviewAnswer>
        <Title>String</Title>
      </RatingReviewResponse>
    </Reviews>
    <SitePath>String</SitePath>
    <StatusId>0</StatusId>
    <Street1>String</Street1>
    <Street2>String</Street2>
    <SystemSettings>
      <Active>false</Active>
      <DefaultLanguage>String</DefaultLanguage>
      <EnableAPITranslation>false</EnableAPITranslation>
      <FacebookPixelId>String</FacebookPixelId>
      <GATrackingId>String</GATrackingId>
      <GTMTrackingId>String</GTMTrackingId>
      <GoogleAdsConversionId>String</GoogleAdsConversionId>
      <GoogleAdsConversionLabel>String</GoogleAdsConversionLabel>
      <InactiveMessage>String</InactiveMessage>
      <LinkedinTagId>String</LinkedinTagId>
      <MultiLanguage>false</MultiLanguage>
      <Searchable>false</Searchable>
      <SendCustomerInformationToExternalProviders>false</SendCustomerInformationToExternalProviders>
      <ShowOnMarketplace>false</ShowOnMarketplace>
    </SystemSettings>
    <TypeId>0</TypeId>
    <Updated>0001-01-01T00:00:00</Updated>
    <WidgetSettings>
      <BookedTimeSlotText>String</BookedTimeSlotText>
      <BookingLayoutId>0</BookingLayoutId>
      <DarkTheme>false</DarkTheme>
      <PrimaryColor>String</PrimaryColor>
      <ServiceLayoutId>0</ServiceLayoutId>
      <ShowEndTime>false</ShowEndTime>
      <ShowNextAvailableTime>false</ShowNextAvailableTime>
      <ShowRebateCodeField>false</ShowRebateCodeField>
      <ShowServiceImage>false</ShowServiceImage>
      <ShowSubscribeToNewsletter>false</ShowSubscribeToNewsletter>
      <TimeLayoutId>0</TimeLayoutId>
    </WidgetSettings>
    <ZipCode>String</ZipCode>
  </Company>
  <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
</UserFavorites>