Booking GraphQL API Reference

Static GraphQL API documentation for the Booking application.

Contact

API Support

https://booking-backend

API Endpoints
https://example.com/graphql

Queries

me

Description

Returns the profile of the currently signed-in user.

Response

Returns a UserProfileDTO

Example

Query
query Me {
  me {
    publicId
    fullName
    dateOfBirth
    email
    phone
    address
  }
}
Response
{
  "data": {
    "me": {
      "publicId": "4",
      "fullName": "xyz789",
      "dateOfBirth": "abc123",
      "email": "abc123",
      "phone": "abc123",
      "address": "xyz789"
    }
  }
}

place

Description

Returns one public place detail by its stable public identifier.

Response

Returns a PlaceDetailsDTO

Arguments
Name Description
publicId - ID!

Example

Query
query Place($publicId: ID!) {
  place(publicId: $publicId) {
    publicId
    name
    address {
      country
      city
      addressLine
      postalCode
    }
    photos {
      publicId
      url
      sortOrder
    }
    categories {
      publicId
      code
      name
    }
    amenities {
      name
    }
    openingHours {
      dayOfWeek
      openTime
      closeTime
      validFrom
      validTo
    }
    resources {
      publicId
      name
      category {
        ...ResourceCategoryDTOFragment
      }
      bookableItems {
        ...ResourceBookableItemSummaryDTOFragment
      }
    }
  }
}
Variables
{"publicId": "4"}
Response
{
  "data": {
    "place": {
      "publicId": "4",
      "name": "abc123",
      "address": AddressDTO,
      "photos": [PlacePhotoDTO],
      "categories": [ResourceCategoryDTO],
      "amenities": [AmenityDTO],
      "openingHours": [PlaceOpeningHourDTO],
      "resources": [ResourceSummaryDTO]
    }
  }
}

places

Description

Returns the initial public place list.

Response

Returns [PlaceSummaryDTO!]!

Arguments
Name Description
filter - PlaceFilterInput

Example

Query
query Places($filter: PlaceFilterInput) {
  places(filter: $filter) {
    publicId
    name
    address {
      country
      city
      addressLine
      postalCode
    }
    categories {
      publicId
      code
      name
    }
    previewPhoto {
      publicId
      url
      sortOrder
    }
  }
}
Variables
{"filter": PlaceFilterInput}
Response
{
  "data": {
    "places": [
      {
        "publicId": 4,
        "name": "abc123",
        "address": AddressDTO,
        "categories": [ResourceCategoryDTO],
        "previewPhoto": PlacePhotoDTO
      }
    ]
  }
}

schedule

Description

Returns the computed schedule for one bookable item or one resource, scoped to a place.

Response

Returns a ScheduleDTO

Arguments
Name Description
input - ScheduleQueryInput!

Example

Query
query Schedule($input: ScheduleQueryInput!) {
  schedule(input: $input) {
    bookableItemPublicId
    resourcePublicId
    events {
      bookableItemPublicId
      bookableItemName
      startsAt
      endsAt
      status
      trainerPublicId
      trainerName
    }
  }
}
Variables
{"input": ScheduleQueryInput}
Response
{
  "data": {
    "schedule": {
      "bookableItemPublicId": "4",
      "resourcePublicId": 4,
      "events": [ScheduleEventDTO]
    }
  }
}

Mutations

updateMe

Description

Updates the current user's profile and returns the updated profile.

Response

Returns a UserProfileDTO!

Arguments
Name Description
input - UpdateUserProfileInput!

Example

Query
mutation UpdateMe($input: UpdateUserProfileInput!) {
  updateMe(input: $input) {
    publicId
    fullName
    dateOfBirth
    email
    phone
    address
  }
}
Variables
{"input": UpdateUserProfileInput}
Response
{
  "data": {
    "updateMe": {
      "publicId": 4,
      "fullName": "abc123",
      "dateOfBirth": "xyz789",
      "email": "xyz789",
      "phone": "abc123",
      "address": "xyz789"
    }
  }
}

Types

AddressDTO

Description

Physical address displayed for a place.

Fields
Field Name Description
country - String Country name.
city - String City or municipality where the place is located.
addressLine - String Street address, building, floor, or other local address details.
postalCode - String Postal or ZIP code.
Example
{
  "country": "abc123",
  "city": "abc123",
  "addressLine": "xyz789",
  "postalCode": "xyz789"
}

AmenityDTO

Description

Facility or feature offered by a place.

Fields
Field Name Description
name - String! Display name, for example Locker, Shower, or Sauna.
Example
{"name": "xyz789"}

BoatCapacity

Description

Boat capacity.

Values
Enum Value Description

ONE_PERSON

TWO_TO_FOUR_PERSONS

FIVE_PLUS_PERSONS

Example
"ONE_PERSON"

BoatFilterInput

Description

Second-step filters for Boat. Applied only when PlaceFilterInput.sport = BOAT.

Fields
Input Field Description
types - [BoatType!] Boat type. Matches boats with any of the selected values.
capacities - [BoatCapacity!] Boat capacity. Matches boats with any of the selected values.
licence - [BoatLicenceRequirement!] Licence requirement. Matches boats with any of the selected values.
skipper - [SkipperAvailability!] Skipper availability. Matches boats with any of the selected values.
Example
{
  "types": ["MOTORBOAT"],
  "capacities": ["ONE_PERSON"],
  "licence": ["REQUIRED"],
  "skipper": ["AVAILABLE"]
}

BoatLicenceRequirement

Description

Whether a licence is required to book the boat.

Values
Enum Value Description

REQUIRED

NOT_REQUIRED

Example
"REQUIRED"

BoatType

Description

Boat type.

Values
Enum Value Description

MOTORBOAT

RIB

JET_SKI

MOTOR_YACHT

CATAMARAN

SAILBOAT

SAILING_YACHT

ROWBOAT

KAYAK

OTHER

Example
"MOTORBOAT"

Boolean

Description

The Boolean scalar type represents true or false.

Example
true

DateInput

Description

Calendar date supplied by the frontend search flow.

Fields
Input Field Description
day - Int! Day of month.
month - Int! Month number.
year - Int! Four-digit year.
Example
{"day": 987, "month": 987, "year": 123}

DayOfWeek

Description

Day of week used by opening hour fields.

Values
Enum Value Description

MONDAY

TUESDAY

WEDNESDAY

THURSDAY

FRIDAY

SATURDAY

SUNDAY

Example
"MONDAY"

FootballFilterInput

Description

Second-step filters for Football. Applied only when PlaceFilterInput.sport = FOOTBALL.

Fields
Input Field Description
environments - [FootballPitchType!] Pitch environment. Matches pitches with any of the selected values.
sizes - [FootballPitchSize!] Pitch size/format. Matches pitches with any of the selected values.
Example
{"environments": ["OUTDOOR"], "sizes": ["ELEVEN_A_SIDE"]}

FootballPitchSize

Description

Football pitch size/format.

Values
Enum Value Description

ELEVEN_A_SIDE

NINE_A_SIDE

SEVEN_A_SIDE

FIVE_A_SIDE

Example
"ELEVEN_A_SIDE"

FootballPitchType

Description

Physical environment of a football pitch.

Values
Enum Value Description

OUTDOOR

ROOFED_OUTDOOR

INDOOR

Example
"OUTDOOR"

GroupedLessonCapacity

Description

Grouped lesson capacity tier.

Values
Enum Value Description

UNDER_10

OVER_10

Example
"UNDER_10"

GymFilterInput

Description

Second-step filters for Gym. Applied only when PlaceFilterInput.sport = GYM.

Fields
Input Field Description
types - [GymType!] Gym offering type. Matches gyms with any of the selected values.
sizes - [GymSize!] Gym floor size. Matches gyms with any of the selected values.
personalTrainer - [PersonalTrainerAvailability!] Personal trainer availability. Matches gyms with any of the selected values.
groupedLessonCapacities - [GroupedLessonCapacity!] Grouped lesson capacity. Matches gyms with any of the selected values.
Example
{
  "types": ["GENERAL_GYM"],
  "sizes": ["LARGE"],
  "personalTrainer": ["AVAILABLE"],
  "groupedLessonCapacities": ["UNDER_10"]
}

GymSize

Description

Gym floor size.

Values
Enum Value Description

LARGE

MEDIUM

SMALL

Example
"LARGE"

GymType

Description

Gym offering type.

Values
Enum Value Description

GENERAL_GYM

GROUPED_LESSONS

Example
"GENERAL_GYM"

ID

Description

The ID scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4") or integer (such as 4) input value will be accepted as an ID.

Example
4

IceHockeyFilterInput

Description

Second-step filters for Ice hockey. Applied only when PlaceFilterInput.sport = ICE_HOCKEY.

Fields
Input Field Description
sizes - [IceHockeyRinkSize!] Rink size/standard. Matches rinks with any of the selected values.
Example
{"sizes": ["IIHF_REGULATION"]}

IceHockeyRinkSize

Description

Ice hockey rink size/standard.

Values
Enum Value Description

IIHF_REGULATION

TRAINING_RINK

Example
"IIHF_REGULATION"

Int

Description

The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.

Example
123

PersonalTrainerAvailability

Description

Whether a personal trainer is available.

Values
Enum Value Description

AVAILABLE

UNAVAILABLE

Example
"AVAILABLE"

PlaceAddressFilterInput

Fields
Input Field Description
city - String
Example
{"city": "abc123"}

PlaceDetailsDTO

Description

Detailed place view shown after a user opens one concrete place.

Fields
Field Name Description
publicId - ID! Stable public identifier used by clients instead of the internal database ID.
name - String! Human-readable place name.
address - AddressDTO Full address shown on the detail page.
photos - [PlacePhotoDTO!]! Ordered gallery photos for the place.
categories - [ResourceCategoryDTO!]! Resource categories publicly offered by the place. Derived from active resources that have at least one active bookable item.
amenities - [AmenityDTO!]! Facilities available at the place, for example locker, shower, or sauna.
openingHours - [PlaceOpeningHourDTO!]! Weekly opening hours. Clients may group consecutive days with identical times.
resources - [ResourceSummaryDTO!]! Resources available at this place. Each resource exposes selectable bookable items.
Example
{
  "publicId": "4",
  "name": "xyz789",
  "address": AddressDTO,
  "photos": [PlacePhotoDTO],
  "categories": [ResourceCategoryDTO],
  "amenities": [AmenityDTO],
  "openingHours": [PlaceOpeningHourDTO],
  "resources": [ResourceSummaryDTO]
}

PlaceFilterInput

Description

Minimal filter accepted by the initial public place list query.

Fields
Input Field Description
address - PlaceAddressFilterInput Address-related filters. Currently only city is supported.
sport - SportType Sport selected by the frontend search flow.
date - DateInput Requested calendar date. Availability filtering will use this in later iterations.
time - String Requested local time in HH:mm format, for example 09:30.
tennis - TennisFilterInput Tennis-specific second-step filters. Applied only when sport = TENNIS. Sending this alongside a different sport (or no sport) is a client error.
football - FootballFilterInput Football-specific second-step filters. Applied only when sport = FOOTBALL. Sending this alongside a different sport (or no sport) is a client error.
iceHockey - IceHockeyFilterInput Ice hockey-specific second-step filters. Applied only when sport = ICE_HOCKEY. Sending this alongside a different sport (or no sport) is a client error.
gym - GymFilterInput Gym-specific second-step filters. Applied only when sport = GYM. Sending this alongside a different sport (or no sport) is a client error.
boat - BoatFilterInput Boat-specific second-step filters. Applied only when sport = BOAT. Sending this alongside a different sport (or no sport) is a client error.
Example
{
  "address": PlaceAddressFilterInput,
  "sport": "TENNIS",
  "date": DateInput,
  "time": "xyz789",
  "tennis": TennisFilterInput,
  "football": FootballFilterInput,
  "iceHockey": IceHockeyFilterInput,
  "gym": GymFilterInput,
  "boat": BoatFilterInput
}

PlaceOpeningHourDTO

Description

Opening hours for one day of week.

Fields
Field Name Description
dayOfWeek - DayOfWeek! Day of week these hours apply to.
openTime - String! Opening time in HH:mm format.
closeTime - String! Closing time in HH:mm format. 24:00 means the place is open until the end of the day.
validFrom - String First date when these hours are valid, formatted as yyyy-MM-dd.
validTo - String Last date when these hours are valid, formatted as yyyy-MM-dd.
Example
{
  "dayOfWeek": "MONDAY",
  "openTime": "abc123",
  "closeTime": "xyz789",
  "validFrom": "abc123",
  "validTo": "xyz789"
}

PlacePhotoDTO

Description

Photo exposed by the place API.

Fields
Field Name Description
publicId - ID! Public identifier for the photo.
url - String! Public URL of the image.
sortOrder - Int! Display order. Lower values should be shown first.
Example
{
  "publicId": "4",
  "url": "abc123",
  "sortOrder": 987
}

PlaceSummaryDTO

Description

Compact place card shown in list and search results.

Fields
Field Name Description
publicId - ID! Stable public identifier used by clients instead of the internal database ID.
name - String! Human-readable place name.
address - AddressDTO Address shown on list cards and maps.
categories - [ResourceCategoryDTO!]! Resource categories publicly offered by the place. Derived from active resources that have at least one active bookable item.
previewPhoto - PlacePhotoDTO Primary image selected for the list card.
Example
{
  "publicId": 4,
  "name": "abc123",
  "address": AddressDTO,
  "categories": [ResourceCategoryDTO],
  "previewPhoto": PlacePhotoDTO
}

ResourceBookableItemSummaryDTO

Description

Bookable item shown under a resource, for example Court 1, Yoga, or Boat X.

Fields
Field Name Description
publicId - ID! Stable public identifier used by clients instead of the internal database ID.
name - String! Display name of the bookable item shown to users.
Example
{
  "publicId": "4",
  "name": "xyz789"
}

ResourceCategoryDTO

Description

Sport/activity category assigned to resources, for example Tennis, Gym, Football, or Boat.

Fields
Field Name Description
publicId - ID! Public identifier for the category.
code - String! Stable business code used by filters and frontend logic, for example TENNIS or GYM.
name - String! Display name, for example Tennis, Gym, Football, or Boat.
Example
{
  "publicId": 4,
  "code": "abc123",
  "name": "xyz789"
}

ResourceSummaryDTO

Description

Resource available at a place, for example a tennis area, gym area, or boat rental group.

Fields
Field Name Description
publicId - ID! Stable public identifier used by clients instead of the internal database ID.
name - String! Resource name shown on the place detail page.
category - ResourceCategoryDTO Sport/activity category this resource belongs to.
bookableItems - [ResourceBookableItemSummaryDTO!]! Concrete bookable items exposed for this resource.
Example
{
  "publicId": "4",
  "name": "xyz789",
  "category": ResourceCategoryDTO,
  "bookableItems": [ResourceBookableItemSummaryDTO]
}

ScheduleAvailabilityStatus

Description

UI-relevant availability derived from active bookings. Never an internal booking status.

Values
Enum Value Description

AVAILABLE

PARTIAL

BUSY

Example
"AVAILABLE"

ScheduleDTO

Description

Computed schedule for the requested bookable item or resource.

Fields
Field Name Description
bookableItemPublicId - ID Public identifier of the requested bookable item, or null when resourcePublicId was used instead.
resourcePublicId - ID Public identifier of the requested resource, or null when bookableItemPublicId was used instead.
events - [ScheduleEventDTO!]! Computed schedule events for the requested range, ordered by start time.
Example
{
  "bookableItemPublicId": "4",
  "resourcePublicId": "4",
  "events": [ScheduleEventDTO]
}

ScheduleEventDTO

Description

One lightweight, publicly-safe calendar event - no booking, user, or price data.

Fields
Field Name Description
bookableItemPublicId - ID! Public identifier of the bookable item this event belongs to.
bookableItemName - String! Display name of the bookable item, for example "Yoga" or "Court 1".
startsAt - String! ISO-8601 UTC start instant of this event.
endsAt - String! ISO-8601 UTC end instant of this event.
status - ScheduleAvailabilityStatus! UI-relevant availability for this event.
trainerPublicId - ID Public identifier of the trainer teaching this event, or null for non-trainer-led items.
trainerName - String Display name of the trainer teaching this event, or null for non-trainer-led items.
Example
{
  "bookableItemPublicId": 4,
  "bookableItemName": "xyz789",
  "startsAt": "xyz789",
  "endsAt": "xyz789",
  "status": "AVAILABLE",
  "trainerPublicId": 4,
  "trainerName": "xyz789"
}

ScheduleQueryInput

Description

Criteria for one schedule read, scoped to one place and either one bookable item or one resource.

Fields
Input Field Description
placePublicId - ID! Place the requested bookable item or resource must belong to.
bookableItemPublicId - ID Single bookable item to load a schedule for, for example one specific tennis court. Exactly one of bookableItemPublicId/resourcePublicId must be sent.
resourcePublicId - ID Resource to load a combined schedule for, for example all group lessons under one resource. Exactly one of bookableItemPublicId/resourcePublicId must be sent.
activityPublicId - ID Restricts a combined resource schedule to bookable items tagged with this activity. Only valid together with resourcePublicId.
trainerPublicId - ID Restricts a combined resource schedule to events taught by this trainer. Only valid together with resourcePublicId.
anchorDate - DateInput! Reference date the requested calendar range is derived from.
view - ScheduleView! Calendar granularity used to derive the requested range from anchorDate.
Example
{
  "placePublicId": 4,
  "bookableItemPublicId": "4",
  "resourcePublicId": "4",
  "activityPublicId": 4,
  "trainerPublicId": "4",
  "anchorDate": DateInput,
  "view": "DAY"
}

ScheduleView

Description

Calendar granularity requested for a schedule read.

Values
Enum Value Description

DAY

WEEK

MONTH

YEAR

Example
"DAY"

SkipperAvailability

Description

Whether a skipper is available.

Values
Enum Value Description

AVAILABLE

UNAVAILABLE

Example
"AVAILABLE"

SportType

Description

Sport values supported by place filtering.

Values
Enum Value Description

TENNIS

GYM

FOOTBALL

ICE_HOCKEY

BOAT

Example
"TENNIS"

String

Description

The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

Example
"xyz789"

TennisCourtSize

Description

Tennis court size.

Values
Enum Value Description

SINGLE

DOUBLE

Example
"SINGLE"

TennisCourtType

Description

Physical environment of a tennis court.

Values
Enum Value Description

OUTDOOR

ROOFED_OUTDOOR

INDOOR

Example
"OUTDOOR"

TennisFilterInput

Description

Second-step filters for Tennis. Applied only when PlaceFilterInput.sport = TENNIS.

Fields
Input Field Description
environments - [TennisCourtType!] Court environment. Matches courts with any of the selected values.
sizes - [TennisCourtSize!] Court size. Matches courts with any of the selected values.
Example
{"environments": ["OUTDOOR"], "sizes": ["SINGLE"]}

UpdateUserProfileInput

Description

Editable subset of the current user's profile.

Partial update: a field omitted (or sent as null) is left unchanged. For the optional free-text fields (phone, address) an empty string clears the stored value.

Fields
Input Field Description
fullName - String
dateOfBirth - String
email - String
phone - String
address - String
Example
{
  "fullName": "xyz789",
  "dateOfBirth": "abc123",
  "email": "xyz789",
  "phone": "abc123",
  "address": "xyz789"
}

UserProfileDTO

Description

Account-page profile of the currently signed-in user.

Fields
Field Name Description
publicId - ID! Stable public identifier of the user.
fullName - String Full display name, for example "Maria Ida Koskela".
dateOfBirth - String Date of birth in ISO yyyy-MM-dd format. Clients format it for display, for example 24.5.1999.
email - String Login email address.
phone - String Contact phone number.
address - String Postal address shown as a single line.
Example
{
  "publicId": "4",
  "fullName": "xyz789",
  "dateOfBirth": "abc123",
  "email": "xyz789",
  "phone": "abc123",
  "address": "abc123"
}