Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
PUT | /homepage/widget/settings | Update homepage widget settings | Update homepage widget settings on the company of the currently logged in user, only administrators are allowed to update homepage menu. |
---|
export class HomepageWidgetServiceLayoutsResponse
{
/** @description The layout id. */
// @ApiMember(Description="The layout id.")
public Id: number;
/** @description The layout name. */
// @ApiMember(Description="The layout name.")
public Name: string;
/** @description The layout description. */
// @ApiMember(Description="The layout description.")
public Description: string;
/** @description The layout code. */
// @ApiMember(Description="The layout code.")
public Code: string;
public constructor(init?: Partial<HomepageWidgetServiceLayoutsResponse>) { (Object as any).assign(this, init); }
}
export class HomepageWidgetTimeLayoutsResponse
{
/** @description The layout id. */
// @ApiMember(Description="The layout id.")
public Id: number;
/** @description The layout name. */
// @ApiMember(Description="The layout name.")
public Name: string;
/** @description The layout description. */
// @ApiMember(Description="The layout description.")
public Description: string;
/** @description The layout code. */
// @ApiMember(Description="The layout code.")
public Code: string;
public constructor(init?: Partial<HomepageWidgetTimeLayoutsResponse>) { (Object as any).assign(this, init); }
}
export class HomepageWidgetBookingLayoutsResponse
{
/** @description The layout id. */
// @ApiMember(Description="The layout id.")
public Id: number;
/** @description The layout name. */
// @ApiMember(Description="The layout name.")
public Name: string;
/** @description The layout description. */
// @ApiMember(Description="The layout description.")
public Description: string;
/** @description The layout code. */
// @ApiMember(Description="The layout code.")
public Code: string;
public constructor(init?: Partial<HomepageWidgetBookingLayoutsResponse>) { (Object as any).assign(this, init); }
}
export class HomepageWidgetBookingMethodsResponse
{
/** @description The layout id. */
// @ApiMember(Description="The layout id.")
public Id: number;
/** @description The layout name. */
// @ApiMember(Description="The layout name.")
public Name: string;
/** @description The layout description. */
// @ApiMember(Description="The layout description.")
public Description: string;
/** @description The layout code. */
// @ApiMember(Description="The layout code.")
public Code: string;
public constructor(init?: Partial<HomepageWidgetBookingMethodsResponse>) { (Object as any).assign(this, init); }
}
export class HomepageWidgetSettingsQueryResponse
{
/** @description The company id. */
// @ApiMember(Description="The company id.")
public CompanyId: string;
/** @description The service layouts id. */
// @ApiMember(Description="The service layouts id.")
public ServiceLayoutId: number;
/** @description The time layouts id. */
// @ApiMember(Description="The time layouts id.")
public TimeLayoutId: number;
/** @description The booking layouts id. */
// @ApiMember(Description="The booking layouts id.")
public BookingLayoutId: number;
/** @description The primary color of the booking widget. */
// @ApiMember(Description="The primary color of the booking widget.")
public PrimaryColor: string;
/** @description If you should show the service image in the booking widget. */
// @ApiMember(Description="If you should show the service image in the booking widget.")
public ShowServiceImage: boolean;
/** @description 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.")
public ShowRebateCodeField: boolean;
/** @description 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.")
public ShowNextAvailableTime: boolean;
/** @description 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.")
public ShowSubscribeToNewsletter: boolean;
/** @description If you should show the create account option. */
// @ApiMember(Description="If you should show the create account option.")
public EnableCreateAccount: boolean;
/** @description If you should show the login to account option. */
// @ApiMember(Description="If you should show the login to account option.")
public EnableLogin: boolean;
/** @description If you should show the facebook login to account option. */
// @ApiMember(Description="If you should show the facebook login to account option.")
public EnableFacebookLogin: boolean;
/** @description If you should show the direct booking option. This enables customer to book with entering contact information. */
// @ApiMember(Description="If you should show the direct booking option. This enables customer to book with entering contact information.")
public EnableDirectBooking: boolean;
/** @description If the site should have dark theme or not. */
// @ApiMember(Description="If the site should have dark theme or not.")
public DarkTheme: boolean;
/** @description If you should show the end time in the booking widget. */
// @ApiMember(Description="If you should show the end time in the booking widget.")
public ShowEndTime: boolean;
/** @description 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")
public BookedTimeSlotText: string;
public ServiceLayoutOptions: HomepageWidgetServiceLayoutsResponse[];
public TimeLayoutOptions: HomepageWidgetTimeLayoutsResponse[];
public BookingLayoutOptions: HomepageWidgetBookingLayoutsResponse[];
public BookingMethodOptions: HomepageWidgetBookingMethodsResponse[];
public constructor(init?: Partial<HomepageWidgetSettingsQueryResponse>) { (Object as any).assign(this, init); }
}
// @ValidateRequest(Validator="IsAuthenticated")
export class UpdateHomepageWidgetSettings implements ICompany
{
/** @description The company id, if empty will use the company id for the user you are logged in with. */
// @ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.")
public CompanyId?: string;
/** @description Serivce Layout. */
// @ApiMember(Description="Serivce Layout.")
public ServiceLayoutId?: number;
/** @description Time Layout. */
// @ApiMember(Description="Time Layout.")
public TimeLayoutId?: number;
/** @description Booking Layout. */
// @ApiMember(Description="Booking Layout.")
public BookingLayoutId?: number;
/** @description The primary color of the booking widget. */
// @ApiMember(Description="The primary color of the booking widget.")
public PrimaryColor: string;
/** @description If the site should have dark theme or not. */
// @ApiMember(Description="If the site should have dark theme or not.")
public DarkTheme?: boolean;
/** @description If you should show the service image in the booking widget. */
// @ApiMember(Description="If you should show the service image in the booking widget.")
public ShowServiceImage?: boolean;
/** @description 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.")
public ShowRebateCodeField?: boolean;
/** @description 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.")
public ShowNextAvailableTime?: boolean;
/** @description If you should show the end time in the booking widget. */
// @ApiMember(Description="If you should show the end time in the booking widget.")
public ShowEndTime?: boolean;
/** @description Show subscribe to newsletter checkbox on the page */
// @ApiMember(Description="Show subscribe to newsletter checkbox on the page")
public ShowSubscribeToNewsletter?: boolean;
/** @description 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")
public BookedTimeSlotText: string;
/** @description If you should show the create account option. */
// @ApiMember(Description="If you should show the create account option.")
public EnableCreateAccount?: boolean;
/** @description If you should show the login to account option. */
// @ApiMember(Description="If you should show the login to account option.")
public EnableLogin?: boolean;
/** @description If you should show the facebook login to account option. */
// @ApiMember(Description="If you should show the facebook login to account option.")
public EnableFacebookLogin?: boolean;
/** @description If you should show the direct booking option. This enables customer to book with entering contact information. */
// @ApiMember(Description="If you should show the direct booking option. This enables customer to book with entering contact information.")
public EnableDirectBooking?: boolean;
public constructor(init?: Partial<UpdateHomepageWidgetSettings>) { (Object as any).assign(this, init); }
}
TypeScript UpdateHomepageWidgetSettings DTOs
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.
PUT /homepage/widget/settings HTTP/1.1
Host: api.bokamera.se
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
CompanyId: 00000000-0000-0000-0000-000000000000,
ServiceLayoutId: 0,
TimeLayoutId: 0,
BookingLayoutId: 0,
PrimaryColor: String,
DarkTheme: False,
ShowServiceImage: False,
ShowRebateCodeField: False,
ShowNextAvailableTime: False,
ShowEndTime: False,
ShowSubscribeToNewsletter: False,
BookedTimeSlotText: String,
EnableCreateAccount: False,
EnableLogin: False,
EnableFacebookLogin: False,
EnableDirectBooking: False
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { ServiceLayoutId: 0, TimeLayoutId: 0, BookingLayoutId: 0, PrimaryColor: String, ShowServiceImage: False, ShowRebateCodeField: False, ShowNextAvailableTime: False, ShowSubscribeToNewsletter: False, EnableCreateAccount: False, EnableLogin: False, EnableFacebookLogin: False, EnableDirectBooking: False, DarkTheme: False, ShowEndTime: False, BookedTimeSlotText: String, ServiceLayoutOptions: [ { Id: 0, Name: String, Description: String, Code: String } ], TimeLayoutOptions: [ { Id: 0, Name: String, Description: String, Code: String } ], BookingLayoutOptions: [ { Id: 0, Name: String, Description: String, Code: String } ], BookingMethodOptions: [ { Id: 0, Name: String, Description: String, Code: String } ] }