API Reference

Scalars

Roles

Common objects

Slots

Projects

Services

Bookings

Spaces

Locations

Assets

Team

Reviews

Reminders

Webhooks

Denylist

Schema

JS SDK


Timerise © 2024

Services overview

Services reflect the business. The service includes entities such as host, location, and asset. Each service has its unique booking page.

Object types

Service

Represents details of a service.

type Service {
	project: Project!
	serviceId: ID!
	shortId: NonEmptyString!
	dateTimeFrom: DateTime
	dateTimeTo: DateTime
	slots(...): [Slot]
	title: NonEmptyString!
	description: String
	instructions: String
	spaces: [Space]
	location: [Location]
	assets: [Asset]
	hosts: [User]
	currency: Currency!
	price: NonNegativeFloat!
	promoPrice: NonNegativeFloat
	qrUrl: URL
	shortUrl: URL
	formFields: [FormField]
	viewConfig: ServiceViewConfig!
	media: [Media]
	labels: [NonEmptyString]
	createdAt: DateTime!
	updatedAt: DateTime!
}

Service fields

ServiceViewConfig

Represents details of a service view config.

type ServiceViewConfig {
	theme: Theme!
	logoUrl: URL
	textColor: HexColorCode
	linkColor: HexColorCode
	buttonTextColor: HexColorCode
	buttonBackgroundColor: HexColorCode
}

ServiceViewConfig fields

Enums

ServiceType

enum ServiceType {
	OFFLINE
	ONLINE
	MIXED
}

ServiceType valid values

AcceptFileType

enum AcceptFileType {
	IMAGE
	AUDIO
	VIDEO
	PDF
	TEXT
}

AcceptFileType valid values

Queries

services

Returns a list of services.

services(
	projectId: ID!
	locationId: ID
	assetId: ID
	hostId: ID
	dateTimeFrom: DateTime
	dateTimeTo: DateTime
	limit: NonNegativeInt
	cursor: ID
): [Service]

services arguments

<aside> 🔑 Minimal role required: STAFF

</aside>

servicesSearch

Returns a list of services.

servicesSearch(
	projectId: ID!
	query: String!
	locationId: ID
	assetId: ID
	hostId: ID
	dateTimeFrom: DateTime
	dateTimeTo: DateTime
): [Service]

servicesSearch arguments

<aside> 🔑 Minimal role required: STAFF

</aside>

service

Returns a specific service.

service(
	serviceId: ID!
	projectId: ID
): Service

service arguments

<aside> 🔑 Minimal role required: USER

</aside>

serviceSlotsStrategies

Returns a list of time slot strategies.

serviceSlotsStrategies(
	projectId: ID!
	serviceId: ID!
): [ServiceSlotStrategy]

serviceSlotsStrategies arguments

<aside> 🔑 Minimal role required: ADMIN / APIADMIN

</aside>

Mutations

serviceCreate

Creates a service.

serviceCreate(
	projectId: ID!
	locationId: ID!
	hosts: [ID]!
	serviceType: ServiceType!
	assets: [ID]
	title: NonEmptyString
	description: NonEmptyString
	instructions: NonEmptyString
	currency: Currency
	price: NonNegativeFloat
	promoPrice: NonNegativeFloat
	specialPrice: NonNegativeFloat
	formConfig: ServiceFormConfigInput
	media: [MediaInput]
	labels: [NonEmptyString]
): Service

serviceCreate arguments

<aside> 🔑 Minimal role required: MANAGER

</aside>

serviceUpdate

Updates a service.

serviceUpdate(
	projectId: ID!
	serviceId: ID!
	locationId: ID
	hosts: [ID]
	serviceType: ServiceType
	assets: [ID]
	title: NonEmptyString
	description: NonEmptyString
	instructions: NonEmptyString
	currency: Currency
	price: NonNegativeFloat
	promoPrice: NonNegativeFloat
	specialPrice: NonNegativeFloat
	formConfig: ServiceFormConfigInput
	media: [MediaInput]
	labels: [NonEmptyString]
): Service

serviceUpdate arguments

<aside> 🔑 Minimal role required: MANAGER

</aside>

serviceDelete

Removes a service.

serviceDelete(
	projectId: ID!
	serviceId: ID!
): String

serviceDelete arguments

<aside> 🔑 Minimal role required: ADMIN / APIADMIN

</aside>

serviceSlotCreate

Creates a slot.

serviceSlotCreate(
	projectId: ID!
	serviceId: ID!
	quantity: NonNegativeInt!
	dateTimeFrom: DateTime!
	dateTimeTo: DateTime!
	slotType: SlotType!
	slotGroupId: ID
	title: NonEmptyString
): Slot

serviceSlotCreate arguments

<aside> 🔑 Minimal role required: MANAGER

</aside>

serviceSlotUpdate

Updates a slot.

serviceSlotUpdate(
	projectId: ID!
	serviceId: ID!
	slotId: ID!
	quantity: NonNegativeInt
	dateTimeFrom: DateTime
	dateTimeTo: DateTime
	slotType: SlotType
	title: NonEmptyString
	slotGroupId: ID
): Slot

serviceSlotUpdate arguments

<aside> 🔑 Minimal role required: MANAGER

</aside>

serviceSlotDelete

Removes a slot.

serviceSlotDelete(
	projectId: ID!
	serviceId: ID!
	slotId: ID!
): String

serviceSlotDelete arguments

<aside> 🔑 Minimal role required: MANAGER

</aside>

serviceSlotsDelete

Removes all slots in specific service.

serviceSlotsDelete(
	projectId: ID!
	serviceId: ID!
): String

serviceSlotsDelete arguments

<aside> 🔑 Minimal role required: MANAGER

</aside>

serviceSlotStrategyCreate

Creates a strategy for specific service.

serviceSlotStrategyCreate(
	projectId: ID!
	serviceId: ID!
	slotType: SlotType!
	slotQuantity: NonNegativeInt!
	slotDuration: Duration!
	slotInterval: Duration!
	strategyType: StrategyType!
	discontinueStrategy: DiscontinueStrategyInput!
	daysOfWeek: [DayOfWeek!]
	timeFrom: Time
	timeTo: Time
): ServiceSlotStrategy

serviceSlotStrategyCreate arguments