Services

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

Field nameValue typeNon-nullDescription
projectId
ID
true
A globally-unique identifier.
serviceId
ID
true
A globally-unique identifier.
shortId
NonEmptyString
true
dateTimeFrom
DateTime
false
dateTimeTo
DateTime
false
duration
Duration
false
slots
[Slot]
false
title
NonEmptyString
true
description
String
false
instructions
String
false
spaces
[Space]
false
locations
[Location]
false
assets
[Asset]
false
hosts
[User]
false
currency
Currency
true
price
NonNegativeFloat
true
promoPrice
NonNegativeFloat
false
qrUrl
URL
false
shortUrl
URL
false
formFields
[FormField]
false
viewConfig
ServiceViewConfig
true
media
[Media]
false
labels
[NonEmptyString]
false
createdAt
DateTime
true
The date and time when a service was created.
updatedAt
DateTime
true
The date and time when a service was updated.

ServiceViewConfig

Represents details of a service view config.

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

ServiceViewConfig fields

Field nameValue typeNon-nullDescription
theme
Theme
true
A globally-unique identifier.
logoUrl
URL
false
A globally-unique identifier.
textColor
HexColorCode
false
linkColor
HexColorCode
false
buttonTextColor
HexColorCode
false
buttonBackgroundColor
HexColorCode
false

Enums

ServiceType

enum ServiceType {
	OFFLINE
	ONLINE
	MIXED
}

ServiceType valid values

Valid valueDescription
OFFLINE
ONLINE
MIXED

AcceptFileType

enum AcceptFileType {
	IMAGE
	AUDIO
	VIDEO
	PDF
	TEXT
}

AcceptFileType valid values

Valid valueDescription
IMAGE
AUDIO
VIDEO
PDF
TEXT

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

Field nameValue typeRequiredDescription
projectId
ID
true
A globally-unique identifier.
locationId
ID
false
A globally-unique identifier.
assetId
ID
false
A globally-unique identifier.
hostId
ID
false
A globally-unique identifier.
dateTimeFrom
DateTime
false
dateTimeTo
DateTime
false
limit
NonNegativeInt
false
cursor
ID
false
A globally-unique identifier.
🔑
Minimal role required: STAFF

servicesSearch

Returns a list of services.

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

servicesSearch arguments

Field nameValue typeRequiredDescription
projectId
ID
true
A globally-unique identifier.
query
String
true
locationId
ID
false
A globally-unique identifier.
assetId
ID
false
A globally-unique identifier.
hostId
ID
false
A globally-unique identifier.
dateTimeFrom
DateTime
false
dateTimeTo
DateTime
false
🔑
Minimal role required: STAFF

service

Returns a specific service.

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

service arguments

Field nameValue typeRequiredDescription
serviceId
ID
true
A globally-unique identifier.
projectId
ID
false
A globally-unique identifier.
🔑
Minimal role required: USER

serviceSlotsStrategies

Returns a list of time slot strategies.

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

serviceSlotsStrategies arguments

Field nameValue typeRequiredDescription
projectId
ID
true
A globally-unique identifier.
locationId
ID
true
A globally-unique identifier.
🔑
Minimal role required: ADMIN / APIADMIN

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

Field nameValue typeRequiredDefaultDescription
projectId
ID
true
A globally-unique identifier.
locationId
ID
true
hosts
[ID]
true
assets
[ID]
false
A list of assets ids.
serviceType
ServiceType
true
title
NonEmptyString
false
description
NonEmptyString
false
instructions
NonEmptyString
false
currency
Currency
false
USD
price
NonNegativeFloat
false
0
promoPrice
NonNegativeFloat
false
specialPrice
NonNegativeFloat
false
formConfig
ServiceFormConfigInput
false
media
[NonEmptyString]
false
labels
[NonEmptyString]
false
🔑
Minimal role required: MANAGER

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

Field nameValue typeRequiredDefaultDescription
projectId
ID
true
A globally-unique identifier.
serviceId
ID
true
locationId
ID
false
hosts
[ID]
true
assets
[ID]
false
A list of assets ids.
serviceType
ServiceType
false
title
NonEmptyString
false
description
NonEmptyString
false
instructions
NonEmptyString
false
currency
Currency
false
USD
price
NonNegativeFloat
false
0
promoPrice
NonNegativeFloat
false
specialPrice
NonNegativeFloat
false
formConfig
ServiceFormConfigInput
false
media
[NonEmptyString]
false
labels
[NonEmptyString]
false
🔑
Minimal role required: MANAGER

serviceDelete

Removes a service.

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

serviceDelete arguments

Field nameValue typeRequiredDescription
projectId
ID
true
A globally-unique identifier.
serviceId
ID
true
A globally-unique identifier.
🔑
Minimal role required: ADMIN / APIADMIN

serviceSlotCreate

Creates a slot.

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

serviceSlotCreate arguments

Field nameValue typeRequiredDescription
projectId
ID
true
A globally-unique identifier.
serviceId
ID
true
slotId
ID
true
quantity
NonNegativeInt
false
A list of assets ids.
dateTimeFrom
DateTime
true
dateTimeTo
DateTime
false
slotType
slotType
false
title
NonEmptyString
false
slotGroupId
ID
🔑
Minimal role required: MANAGER

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

Field nameValue typeRequiredDescription
projectId
ID
true
A globally-unique identifier.
serviceId
ID
true
slotId
ID
true
quantity
NonNegativeInt
false
dateTimeFrom
DateTime
false
A list of assets ids.
dateTimeTo
DateTime
false
slotType
SlotType
false
title
NonEmptyString
false
slotGroupId
ID
false
🔑
Minimal role required: MANAGER

serviceSlotDelete

Removes a slot.

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

serviceSlotDelete arguments

Field nameValue typeRequiredDescription
projectId
ID
true
A globally-unique identifier.
serviceId
ID
true
A globally-unique identifier.
slotId
ID
true
🔑
Minimal role required: MANAGER

serviceSlotsDelete

Removes all slots in specific service.

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

serviceSlotsDelete arguments

Field nameValue typeRequiredDescription
projectId
ID
true
A globally-unique identifier.
serviceId
ID
true
A globally-unique identifier.
🔑
Minimal role required: MANAGER

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

Field nameValue typeRequiredDescription
projectId
ID
true
A globally-unique identifier.
serviceId
ID
true
slotType:
[ID]
true
slotQuantity
[ID]
true
A list of assets ids.
slotDuration
ServiceType
true
slotInterval
NonEmptyString
true
strategyType
String
true
discontinueStrategy
String
true
daysOfWeek
[DayOfWeek]
true
timeFrom
Time
false
timeTo
Time
false
🔑
Minimal role required: ADMIN / APIADMIN

serviceSlotStrategyDelete

Removes a strategy from service.

serviceSlotStrategyDelete(
	projectId: ID!
	serviceId: ID!
	strategyId: ID!
): String

serviceSlotStrategyDelete arguments

Field nameValue typeRequiredDescription
projectId
ID
true
A globally-unique identifier.
serviceId
ID
true
A globally-unique identifier.
strategyId
ID
true
A globally-unique identifier.
🔑
Minimal role required: ADMIN / APIADMIN