Services
Services or event-type are the fundamental concepts of TimeTime. An event-type is used to represent a service that can be booked. For example, a hair salon may have two types of events: "Haircut" and "Wash and Blow-dry".
Basic attributes
Id (id)
A uuid representing the service.
Name (name)
The name of the service. For example, "Surfing class".
Description (description)
A description of the service. For example, "1 hour surfing class. Does not include material".
Owner (userId)
The id of the user who owns the service.
UI attributes
Image (imageUrl)
A URL to an image in png or jpg format that is used in the UI to illustrate the service.
Theme (theme) A theme object containing the colors that will be used in the UI to represent the service.
Example:
Copy code
{
"primary": "#ff0000",
"secondary": "#00ff00",
"tertiary": "#0000ff"
}
Units label (unitsLabel)
Only activated when the service has units. Indicates to the UI what to display in the selector.
Example: Surfing class
Copy code
{
"unitsLabel": "Students"
}
Example: Units label for a restaurant
Copy code
{
"unitsLabel": "Diners"
}
Questions
It is common for services to have associated questions. For example, a restaurant may want to know about customer allergies. Questions are defined in the questions attribute of the service.
Questions are an array of question objects, which in turn have different subtypes: EmailQuestion, LocationQuestion, PasswordQuestion, PhoneQuestion, TextQuestion.
All questions have id, label, and required as common attributes. The LocationQuestion field has an additional attribute AllowedOptions that defines which options are available to the user.
Email
Questions of type email allow the client to ask for their email.
Example: Email question type
questions: [
{
id: "b10bb986-2732-41d0-bf19-e0700eed2158"
label: "write your email here",
required: true,
type: "EmailQuestion",
},
];
Location
Location questions allow the client to enter a location.
Example: Location question type
questions: [
{
id: "b10bb986-2732-41d0-bf19-e0700eed2158"
label: "Write your desired location",
required: true,
type: "LocationQuestion",
allowedOptions: [""],
},
];
Password
Questions of type password allow the client to ask for their password.
Example: Password question type
questions: [
{
id: "b10bb986-2732-41d0-bf19-e0700eed2158"
label: "Write a passwrord",
required: true,
type: "PasswordQuestion",
},
];
Phone
Questions of type phone allow the client to ask for their phone number.
Example: Phone question type
questions: [
{
id: "b10bb986-2732-41d0-bf19-e0700eed2158"
label: "Write your phone number",
required: true,
type: "PhoneQuestion",
},
];
Text
Questions of type text allow the client to enter a generic text before making the reservation.
Example: Text question type
questions: [
{
id: "b10bb986-2732-41d0-bf19-e0700eed2158"
label: "Write your food preferences",
required: true,
type: "TextQuestion",
},
];
Availability rules
Availability rules allow you to specify under what circumstances a slot can be booked in the service. For example by setting a schedule, or setting a limit on the number of reservations per day.
Consult the availability rules section. to see all available rule types.
Notifications
The notifications field allows you to add confirmation and reminder messages associated with the reservations made in the service. For more advanced configuration and more customization, it is recommended to use webhooks. More information about webhooks