API Reference
Timerise © 2022
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!
serviceType: ServiceType!
dateTimeFrom: DateTime
dateTimeTo: DateTime
duration: Duration
slots(...): [Slot]
title: NonEmptyString!
description: NonEmptyString
instructions: NonEmptyString
location: Location!
assets: [Asset]
hosts: [User]
currency: Currency!
price: NonNegativeFloat!
specialPrice: NonNegativeFloat
promoPrice: NonNegativeFloat
qrUrl: URL
shortUrl: URL
termsUrl: URL
privacyPolicyUrl: URL
viewConfig: ServiceViewConfig!
formConfig: ServiceFormConfig
media: [Media]
labels: [NonEmptyString]
createdAt: DateTime!
updatedAt: DateTime!
}
Field name | Value type | Non-null | Description |
---|---|---|---|
projectId | ID | true | A globally-unique identifier. |
serviceId | ID | true | A globally-unique identifier. |
shortId | NonEmptyString | true | |
serviceType | ServiceType | true | |
dateTimeFrom | DateTime | false | |
dateTimeTo | DateTime | false | |
duration | Duration | false | |
slots | [Slot] | false | |
title | NonEmptyString | true | |
description | NonEmptyString | false | |
instructions | NonEmptyString | false | |
location | Location | true | |
assets | [Asset] | false | |
hosts | [User] | false | |
currency | Currency | true | |
price | NonNegativeFloat | true | |
specialPrice | NonNegativeFloat | false | |
promoPrice | NonNegativeFloat | false | |
qrUrl | URL | false | |
shortUrl | URL | false | |
termsUrl | URL | false | |
privacyPolicyUrl | URL | false | |
viewConfig | ServiceViewConfig | true | |
formConfig | ServiceFormConfig | false | |
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
}
Field name | Value type | Non-null | Description |
---|---|---|---|
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 |
ServiceFormConfig
Represents form details for a service.
type ServiceFormConfig {
label: NonEmptyString
description: String
emailAddress: EmailAddressConfig
phoneNumber: PhoneNumberConfig
fullName: FullNameConfig
comment: CommentConfig
fileUpload: FileUploadConfig
quantity: QuantityConfig
slot: SlotConfig
}
Field name | Value type | Non-null | Description |
---|---|---|---|
label | NonEmptyString | false | |
description | NonEmptyString | false | |
emailAddres | EmailAddressConfig | false | |
phoneNumber | PhoneNumberConfig | false | |
fullName | FullNameConfig | false | |
comment | CommentConfig | false | |
fileUpload | FileUploadConfig | false | |
quantity | QuantityConfig | false | |
slot | SlotConfig | false |
EmailAddressConfig
type EmailAddressConfig {
enabled: Boolean
required: Boolean
notifications: Boolean
label: NonEmptyString
order: Int
width: Int
defaultValue: EmailAddress
}
Field name | Value type | Non-null | Description |
---|---|---|---|
enabled | Boolean | false | |
required | Boolean | false | |
notifications | Boolean | false | |
label | NonEmptyString | false | |
order | Int | false | |
width | Int | false | |
defaultValue | EmailAddress | false |
PhoneNumberConfig
type PhoneNumberConfig {
enabled: Boolean
required: Boolean
notifications: Boolean
label: NonEmptyString
order: Int
width: Int
defaultValue: PhoneNumber
}
Field name | Value type | Non-null | Description |
---|---|---|---|
enabled | Boolean | false | |
required | Boolean | false | |
notifications | Boolean | false | |
label | NonEmptyString | false | |
order | Int | false | |
width | Int | false | |
defaultValue | PhoneNumber | false |
FullNameConfig
type FullNameConfig {
enabled: Boolean
required: Boolean
label: NonEmptyString
order: Int
width: Int
defaultValue: String
}
Field name | Value type | Non-null | Description |
---|---|---|---|
enabled | Boolean | true | |
required | Boolean | false | |
notifications | Boolean | false | |
label | NonEmptyString | false | |
order | Int | false | |
width | Int | false | |
defaultValue | String | false |
CommentConfig
type CommentConfig {
enabled: Boolean
required: Boolean
label: NonEmptyString
order: Int
defaultValue: String
}
Field name | Value type | Non-null | Description |
---|---|---|---|
enabled | Boolean | false | |
required | Boolean | false | |
notifications | Boolean | false | |
label | NonEmptyString | false | |
order | Int | false | |
width | Int | false | |
defaultValue | String | false |
FileUploadConfig
type FileUploadConfig {
enabled: Boolean
required: Boolean
accept: [AcceptFileType]
multiple: Boolean
label: NonEmptyString
order: Int
}
Field name | Value type | Non-null | Description |
---|---|---|---|
enabled | Boolean | false | |
required | Boolean | false | |
accept | [AcceptFileType] | false | |
label | NonEmptyString | false | |
order | Int | false |
QuantityConfig
type QuantityConfig {
enabled: Boolean
label: NonEmptyString
order: Int
width: NonNegativeInt
defaultValue: NonNegativeInt
maxValue: NonNegativeInt
}
Field name | Value type | Non-null | Description |
---|---|---|---|
enabled | Boolean | false | |
label | NonEmptyString | false | |
order | Int | false | |
width | NonNegativeInt | false | |
defaultValue | NonNegativeInt | false | |
maxValue | NonNegativeInt | false |
SlotConfig
type SlotConfig {
duration: Boolean
quantity: Boolean
}
Enums
ServiceType
enum ServiceType {
OFFLINE
ONLINE
MIXED
}
AcceptFileType
enum AcceptFileType {
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]
Field name | Value type | Required | Description |
---|---|---|---|
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]
Field name | Value type | Required | Description |
---|---|---|---|
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
Field name | Value type | Required | Description |
---|---|---|---|
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]
Field name | Value type | Required | Description |
---|---|---|---|
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
Field name | Value type | Required | Default | Description |
---|---|---|---|---|
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
Field name | Value type | Required | Default | Description |
---|---|---|---|---|
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
Field name | Value type | Required | Description |
---|---|---|---|
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
Field name | Value type | Required | Description |
---|---|---|---|
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
Field name | Value type | Required | Description |
---|---|---|---|
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
Field name | Value type | Required | Description |
---|---|---|---|
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
Field name | Value type | Required | Description |
---|---|---|---|
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
Field name | Value type | Required | Description |
---|---|---|---|
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
Field name | Value type | Required | Description |
---|---|---|---|
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
- Services overview
- Object types
- Service
- ServiceViewConfig
- ServiceFormConfig
- EmailAddressConfig
- PhoneNumberConfig
- FullNameConfig
- CommentConfig
- FileUploadConfig
- QuantityConfig
- SlotConfig
- Enums
- ServiceType
- AcceptFileType
- Queries
- services
- servicesSearch
- service
- serviceSlotsStrategies
- Mutations
- serviceCreate
- serviceUpdate
- serviceDelete
- serviceSlotCreate
- serviceSlotUpdate
- serviceSlotDelete
- serviceSlotsDelete
- serviceSlotStrategyCreate
- serviceSlotStrategyDelete