Requires the role: | superadmin |
POST | /companies/{Id}/copy | Create new company | Copy a company information. |
---|
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Id | query | Guid? | No | Id for a specific company you want to copy. |
Name | body | string | Yes | |
OrganisationNumber | body | string | Yes | |
TypeId | body | int | Yes | What type of company. If it's used for personal use or as a company. 1 = Company use, 2 = Personal use |
CompanyOwnerId | body | int | Yes | What company owner. 1 = BokaMera (default) |
Services | query | int[] | No | Include following services, if null all active services will be copied. |
ResourceTypes | query | int[] | No | Include following resource types, if null all active resource types will be copied. |
Resources | query | int[] | No | Include following resources, if null all active resources will be copied. |
RecurringSchedules | query | int[] | No | Include following recurring schedules, if null all active recurring schedules will be copied. |
DateSchedules | query | int[] | No | Include following date schedules, if null all active date schedules will be copied. |
OpeningHours | body | string | Yes | |
Details | body | string | No | |
CategoryId | body | string | Yes | |
LogoType | body | uri | Yes | |
Street1 | body | string | No | |
Street2 | body | string | No | |
ZipCode | body | string | No | |
City | body | string | No | |
CountryId | body | string | No | |
Longitude | body | string | Yes | |
Latitude | body | string | No | |
Phone | body | string | No | |
body | string | Yes | ||
Fax | body | string | No | |
Homepage | body | string | No | |
SitePath | body | string | Yes | |
CompanyUser | body | CreateCompanyCompanyUser | Yes | |
BillingInformation | body | CreateCompanyBillingInformation | No | |
LicenseTypeId | body | int | Yes | Id of the license type |
DomainName | body | string | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Firstname | form | string | Yes | |
Lastname | form | string | Yes | |
Phone | form | string | Yes | |
form | string | Yes | ||
WorkerId | form | int? | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
BillingMethodId | form | int | Yes | The prefered billing method. |
Name | form | string | No | The name that should be printed on the billing information, normally this would be your company name. |
Attention | form | string | No | If you want to add the attention to the billing address. |
Street1 | form | string | No | The street for the billing adress. This is required when having postal invoice as billing method. |
Street2 | form | string | No | The street for the billing adress. |
ZipCode | form | string | No | The zip code (postal code) for the billing adress. This is required when having postal invoice as billing method. |
City | form | string | No | The city for the billing adress. This is required when having postal invoice as billing method. |
CountryId | form | string | No | The country for the billing adress. This is required when having postal invoice as billing method. |
form | string | No | The billing email. This is required when having email invoice as billing method. | |
PaymentTermsDays | form | int? | No | The billing payment terms in days. This is default 15 days. |
VatRegistrationNumber | form | string | No | The company vat registration number. |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Id | form | Guid | No | |
Name | form | string | No | |
OrganisationNumber | form | string | No | The organisation number will only be visible if your owner to the company |
TypeId | form | int | No | What type of company. If it's used for personal use or as a company. |
Details | form | string | No | |
CategoryId | form | int | No | |
Category | form | string | No | |
LogoType | form | Uri | No | |
CoverImage | form | Uri | No | |
Street1 | form | string | No | |
Street2 | form | string | No | |
ZipCode | form | string | No | |
City | form | string | No | |
CountryId | form | string | No | |
Longitude | form | string | No | |
Latitude | form | string | No | |
Distance | form | double? | No | |
Phone | form | string | No | |
form | string | No | ||
Homepage | form | string | No | |
SitePath | form | string | No | |
Active | form | bool | No | |
CodeLockSystem | form | CodeLockSystemType? | No | |
IsFreeAccount | form | bool | No | |
Updated | form | datetime | No | Will show when the company was updated, note it will only be shown if your logged in as admin for the company. |
Created | form | datetime | No | Will show when the company was created, note it will only be shown if your logged in as admin for the company. |
StatusId | form | int | No | |
IsFavorite | form | boolean | No | If the company is marked as favourite for the logged in user |
BookingAgreements | form | string | No | |
BookingSettings | form | CompanyBookingSettings | No | |
SystemSettings | form | CompanySystemSettings | No | |
WidgetSettings | form | CompanyWidgetSettings | No | |
HomepageSettings | form | HomepageSettingsResponse | No | |
RatingSummary | form | CompanyRatingSummary | No | |
Reviews | form | List<RatingReviewResponse> | No | |
CustomerCustomFields | form | List<CustomFieldConfigData> | No | |
ResponseStatus | form | ResponseStatus | No |
Sample | |
RcoM5 | |
AxemaVaka | |
VanderbiltOmnis | |
ParakeyParakey | |
AmidoDax | |
TelkeyTelkey | |
TechSolutionsSiedle | |
Accessy | |
Zesec | |
Enabla |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
EnableMobileApp | form | bool | No | |
BookingReceiptMessage | form | string | No | |
ShowFreeTimesLeft | form | bool | No | |
EnableShowBookedTimes | form | bool | No | |
BookingAgreement | form | string | No | |
WeekNumberSetting | form | int | No | The settings for how to display week number. 1 = ShowWeekNumberFromDate, 2 = ShowWeekNumberToDate, 3 = ShowWeekNumberFromToDate, 4 = DontShowWeekNumber |
ShowBookedTimes | form | bool | No | |
PaymentProviderId | form | int | No | 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 |
BookOnlyOnExistingCustomers | form | boolean | No | If it's only allowed for existing customers to book |
PaymentEnabled | form | boolean | No | If payment is enabled |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Active | form | bool | No | If the booking is active or not |
InactiveMessage | form | string | No | If the booking is not active, what message to show to the customers |
Searchable | form | bool | No | If the company should be visible in search results on hompage |
GATrackingId | form | string | No | If you have a google analytics account and want to track your customers behaviors. |
GoogleAdsConversionId | form | string | No | If you have a google Ads Conversion Id account and want to track your customers behaviors. |
LinkedinTagId | form | string | No | If you have a LinkedIn account and want to track your customers behaviors. |
GoogleAdsConversionLabel | form | string | No | If you have a Google Ads Conversion Label and want to track your customers behaviors. |
GTMTrackingId | form | string | No | If you have a google tag manager account and want to track your customers behaviors. |
FacebookPixelId | form | string | No | If you have a facebook account and want to track your customers behaviors. |
MultiLanguage | form | bool | No | If you want your customers to be albe to change language on your homepage |
ShowOnMarketplace | form | bool | No | If the company should be visible on the marketplace |
EnableAPITranslation | form | bool | No | If you want your own written text on your homepage to be translated using google analytics when a user changes language |
DefaultLanguage | form | string | No | What is the standard language your homepage information is written in. Select from the different countries, ie. SE,NO,EN |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
ServiceLayoutId | form | int | No | The service layouts id. |
TimeLayoutId | form | int | No | The time layouts id. |
BookingLayoutId | form | int | No | The booking layouts id. |
PrimaryColor | form | string | No | The primary color of the booking widget. |
ShowServiceImage | form | bool | No | If you should show the service image in the booking widget. |
ShowRebateCodeField | form | bool | No | If you should show the rebate code field in the booking widget. |
ShowNextAvailableTime | form | bool | No | If you should show the next available time in the booking widget. |
ShowEndTime | form | bool | No | If you should show the end time in the booking widget. |
BookedTimeSlotText | form | string | No | What text to show on booked time slots. Default text is Booked |
DarkTheme | form | bool | No | If the widget should be displayed in dark theme |
ShowSubscribeToNewsletter | form | bool | No | If you should show the subscribe to newsletter checkbox in the booking widget. |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
HomepageHeading | form | string | No | The text for homepage heading |
WelcomePageHeading | form | string | No | The text for homepage startpage heading |
WelcomePageBody | form | string | No | The text for homepage startpage body |
AboutUsPageHeading | form | string | No | The text for homepage about us page heading |
AboutUsPageBody | form | string | No | The text for homepage about us page body |
ImageUrl | form | Uri | No | The startpage image url |
CoverImage | form | Uri | No | The cover image url |
ShowRating | form | bool | No | Show rating on the page |
HomePageTemplateId | form | int | No | The template for the homepage |
HeroSectionStyleId | form | int | No | The hero section style for the homepage |
EnableHomepage | form | bool | No | Enable the BokaMera Homepage |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
AverageScore | form | double | No | The average rating score |
RatingScore1Count | form | int | No | The number of ratings of score 1 |
RatingScore2Count | form | int | No | The number of ratings of score 2 |
RatingScore3Count | form | int | No | The number of ratings of score 3 |
RaingScore4Count | form | int | No | The number of ratings of score 4 |
RatingScore5Count | form | int | No | The number of ratings of score 5 |
Count | form | int | No | The number of ratings |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Title | form | string | No | The title for the review |
Description | form | string | No | The description for the review |
RatingScore | form | int | No | The rating score |
Author | form | string | No | The review author |
Created | form | DateTime | No | The created date |
ReviewAnswer | form | string | No | The review answer from the company |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Id | form | int | No | Custom field id |
Name | form | string | No | Configuration name. Example: 'Number of persons'. |
Description | form | string | No | Custom field description. Example: 'For how many persons is this booking?' |
Width | form | int? | No | Field width. Example: 20 for 20px |
DataType | form | string | No | Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox' |
DefaultValue | form | string | No | Default value of the field. Example: '3' |
IsMandatory | form | bool | No | Determines if the field is required to have a value or not |
MandatoryErrorMessage | form | string | No | Error message shown to the user if the field data is required but not entered |
MaxLength | form | int | No | Max lenght of the field |
MultipleLineText | form | bool | No | If the field should have multiple lines |
RegEx | form | string | No | Regular expression used for validation of the field |
RegExErrorMessage | form | string | No | Error message shown if the regular expression validation failed |
Values | form | List<CustomFieldValueResponse> | No | The values to select from if Datatype is DropDown for this custom field |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Value | form | string | No |
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=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>