BokaMera.API.Host

<back to all web services

CopyCompany

Requires Authentication
Requires the role:superadmin
The following routes are available for this service:
POST/companies/{Id}/copyCreate new companyCopy a company information.
CopyCompany Parameters:
NameParameterData TypeRequiredDescription
IdqueryGuid?NoId for a specific company you want to copy.
NamebodystringYes
OrganisationNumberbodystringYes
TypeIdbodyintYesWhat type of company. If it's used for personal use or as a company. 1 = Company use, 2 = Personal use
CompanyOwnerIdbodyintYesWhat company owner. 1 = BokaMera (default)
Servicesqueryint[]NoInclude following services, if null all active services will be copied.
ResourceTypesqueryint[]NoInclude following resource types, if null all active resource types will be copied.
Resourcesqueryint[]NoInclude following resources, if null all active resources will be copied.
RecurringSchedulesqueryint[]NoInclude following recurring schedules, if null all active recurring schedules will be copied.
DateSchedulesqueryint[]NoInclude following date schedules, if null all active date schedules will be copied.
OpeningHoursbodystringYes
DetailsbodystringNo
CategoryIdbodystringYes
LogoTypebodyuriYes
Street1bodystringNo
Street2bodystringNo
ZipCodebodystringNo
CitybodystringNo
CountryIdbodystringNo
LongitudebodystringYes
LatitudebodystringNo
PhonebodystringNo
EmailbodystringYes
FaxbodystringNo
HomepagebodystringNo
SitePathbodystringYes
CompanyUserbodyCreateCompanyCompanyUserYes
BillingInformationbodyCreateCompanyBillingInformationNo
LicenseTypeIdbodyintYesId of the license type
DomainNamebodystringNo
CreateCompanyCompanyUser Parameters:
NameParameterData TypeRequiredDescription
FirstnameformstringYes
LastnameformstringYes
PhoneformstringYes
EmailformstringYes
WorkerIdformint?No
CreateCompanyBillingInformation Parameters:
NameParameterData TypeRequiredDescription
BillingMethodIdformintYesThe prefered billing method.
NameformstringNoThe name that should be printed on the billing information, normally this would be your company name.
AttentionformstringNoIf you want to add the attention to the billing address.
Street1formstringNoThe street for the billing adress. This is required when having postal invoice as billing method.
Street2formstringNoThe street for the billing adress.
ZipCodeformstringNoThe zip code (postal code) for the billing adress. This is required when having postal invoice as billing method.
CityformstringNoThe city for the billing adress. This is required when having postal invoice as billing method.
CountryIdformstringNoThe country for the billing adress. This is required when having postal invoice as billing method.
EmailformstringNoThe billing email. This is required when having email invoice as billing method.
PaymentTermsDaysformint?NoThe billing payment terms in days. This is default 15 days.
VatRegistrationNumberformstringNoThe company vat registration number.
CompanyQueryResponse Parameters:
NameParameterData TypeRequiredDescription
IdformGuidNo
NameformstringNo
OrganisationNumberformstringNoThe organisation number will only be visible if your owner to the company
TypeIdformintNoWhat type of company. If it's used for personal use or as a company.
DetailsformstringNo
CategoryIdformintNo
CategoryformstringNo
LogoTypeformUriNo
CoverImageformUriNo
Street1formstringNo
Street2formstringNo
ZipCodeformstringNo
CityformstringNo
CountryIdformstringNo
LongitudeformstringNo
LatitudeformstringNo
Distanceformdouble?No
PhoneformstringNo
EmailformstringNo
HomepageformstringNo
SitePathformstringNo
ActiveformboolNo
CodeLockSystemformCodeLockSystemType?No
IsFreeAccountformboolNo
UpdatedformdatetimeNoWill show when the company was updated, note it will only be shown if your logged in as admin for the company.
CreatedformdatetimeNoWill show when the company was created, note it will only be shown if your logged in as admin for the company.
StatusIdformintNo
IsFavoriteformbooleanNoIf the company is marked as favourite for the logged in user
BookingAgreementsformstringNo
BookingSettingsformCompanyBookingSettingsNo
SystemSettingsformCompanySystemSettingsNo
WidgetSettingsformCompanyWidgetSettingsNo
HomepageSettingsformHomepageSettingsResponseNo
RatingSummaryformCompanyRatingSummaryNo
ReviewsformList<RatingReviewResponse>No
CustomerCustomFieldsformList<CustomFieldConfigData>No
ResponseStatusformResponseStatusNo
CodeLockSystemType Enum:
Sample
RcoM5
AxemaVaka
VanderbiltOmnis
ParakeyParakey
AmidoDax
TelkeyTelkey
TechSolutionsSiedle
Accessy
Zesec
Enabla
CompanyBookingSettings Parameters:
NameParameterData TypeRequiredDescription
EnableMobileAppformboolNo
BookingReceiptMessageformstringNo
ShowFreeTimesLeftformboolNo
EnableShowBookedTimesformboolNo
BookingAgreementformstringNo
WeekNumberSettingformintNoThe settings for how to display week number. 1 = ShowWeekNumberFromDate, 2 = ShowWeekNumberToDate, 3 = ShowWeekNumberFromToDate, 4 = DontShowWeekNumber
ShowBookedTimesformboolNo
PaymentProviderIdformintNoThe 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
BookOnlyOnExistingCustomersformbooleanNoIf it's only allowed for existing customers to book
PaymentEnabledformbooleanNoIf payment is enabled
CompanySystemSettings Parameters:
NameParameterData TypeRequiredDescription
ActiveformboolNoIf the booking is active or not
InactiveMessageformstringNoIf the booking is not active, what message to show to the customers
SearchableformboolNoIf the company should be visible in search results on hompage
GATrackingIdformstringNoIf you have a google analytics account and want to track your customers behaviors.
GoogleAdsConversionIdformstringNoIf you have a google Ads Conversion Id account and want to track your customers behaviors.
LinkedinTagIdformstringNoIf you have a LinkedIn account and want to track your customers behaviors.
GoogleAdsConversionLabelformstringNoIf you have a Google Ads Conversion Label and want to track your customers behaviors.
GTMTrackingIdformstringNoIf you have a google tag manager account and want to track your customers behaviors.
FacebookPixelIdformstringNoIf you have a facebook account and want to track your customers behaviors.
MultiLanguageformboolNoIf you want your customers to be albe to change language on your homepage
ShowOnMarketplaceformboolNoIf the company should be visible on the marketplace
EnableAPITranslationformboolNoIf you want your own written text on your homepage to be translated using google analytics when a user changes language
DefaultLanguageformstringNoWhat is the standard language your homepage information is written in. Select from the different countries, ie. SE,NO,EN
CompanyWidgetSettings Parameters:
NameParameterData TypeRequiredDescription
ServiceLayoutIdformintNoThe service layouts id.
TimeLayoutIdformintNoThe time layouts id.
BookingLayoutIdformintNoThe booking layouts id.
PrimaryColorformstringNoThe primary color of the booking widget.
ShowServiceImageformboolNoIf you should show the service image in the booking widget.
ShowRebateCodeFieldformboolNoIf you should show the rebate code field in the booking widget.
ShowNextAvailableTimeformboolNoIf you should show the next available time in the booking widget.
ShowEndTimeformboolNoIf you should show the end time in the booking widget.
BookedTimeSlotTextformstringNoWhat text to show on booked time slots. Default text is Booked
DarkThemeformboolNoIf the widget should be displayed in dark theme
ShowSubscribeToNewsletterformboolNoIf you should show the subscribe to newsletter checkbox in the booking widget.
HomepageSettingsResponse Parameters:
NameParameterData TypeRequiredDescription
HomepageHeadingformstringNoThe text for homepage heading
WelcomePageHeadingformstringNoThe text for homepage startpage heading
WelcomePageBodyformstringNoThe text for homepage startpage body
AboutUsPageHeadingformstringNoThe text for homepage about us page heading
AboutUsPageBodyformstringNoThe text for homepage about us page body
ImageUrlformUriNoThe startpage image url
CoverImageformUriNoThe cover image url
ShowRatingformboolNoShow rating on the page
HomePageTemplateIdformintNoThe template for the homepage
HeroSectionStyleIdformintNoThe hero section style for the homepage
EnableHomepageformboolNoEnable the BokaMera Homepage
CompanyRatingSummary Parameters:
NameParameterData TypeRequiredDescription
AverageScoreformdoubleNoThe average rating score
RatingScore1CountformintNoThe number of ratings of score 1
RatingScore2CountformintNoThe number of ratings of score 2
RatingScore3CountformintNoThe number of ratings of score 3
RaingScore4CountformintNoThe number of ratings of score 4
RatingScore5CountformintNoThe number of ratings of score 5
CountformintNoThe number of ratings
RatingReviewResponse Parameters:
NameParameterData TypeRequiredDescription
TitleformstringNoThe title for the review
DescriptionformstringNoThe description for the review
RatingScoreformintNoThe rating score
AuthorformstringNoThe review author
CreatedformDateTimeNoThe created date
ReviewAnswerformstringNoThe review answer from the company
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

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 /companies/{Id}/copy HTTP/1.1 
Host: api.bokamera.se 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<CopyCompany xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <BillingInformation>
    <Attention>String</Attention>
    <BillingMethodId>0</BillingMethodId>
    <City>String</City>
    <CountryId>String</CountryId>
    <Email>String</Email>
    <Name>String</Name>
    <PaymentTermsDays>0</PaymentTermsDays>
    <Street1>String</Street1>
    <Street2>String</Street2>
    <VatRegistrationNumber>String</VatRegistrationNumber>
    <ZipCode>String</ZipCode>
  </BillingInformation>
  <CategoryId>0</CategoryId>
  <City>String</City>
  <CompanyOwnerId>0</CompanyOwnerId>
  <CompanyUser>
    <Email>String</Email>
    <Firstname>String</Firstname>
    <Lastname>String</Lastname>
    <Phone>String</Phone>
    <WorkerId>0</WorkerId>
  </CompanyUser>
  <CountryId>String</CountryId>
  <DateSchedules xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>0</d2p1:int>
  </DateSchedules>
  <Details>String</Details>
  <DomainName>String</DomainName>
  <Email>String</Email>
  <Fax>String</Fax>
  <Homepage>String</Homepage>
  <Id>00000000-0000-0000-0000-000000000000</Id>
  <Latitude>String</Latitude>
  <LicenseTypeId>0</LicenseTypeId>
  <LogoType i:nil="true" />
  <Longitude>String</Longitude>
  <Name>String</Name>
  <OpeningHours>String</OpeningHours>
  <OrganisationNumber>String</OrganisationNumber>
  <Phone>String</Phone>
  <RecurringSchedules xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>0</d2p1:int>
  </RecurringSchedules>
  <ResourceTypes xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>0</d2p1:int>
  </ResourceTypes>
  <Resources xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>0</d2p1:int>
  </Resources>
  <Services xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>0</d2p1:int>
  </Services>
  <SitePath>String</SitePath>
  <Street1>String</Street1>
  <Street2>String</Street2>
  <TypeId>0</TypeId>
  <ZipCode>String</ZipCode>
</CopyCompany>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<CompanyQueryResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <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: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>
  <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>
    <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>
</CompanyQueryResponse>