Skip to content

Consulting Services Query

Note: The Teachify Admin API is currently under development and not yet available for public use. This documentation is provided for preview purposes only.

Endpoint and authentication. All admin queries are sent to POST /admin/graphqlnot /graphql, which is the public school API. Authenticate with an sk_live_… API key in the X-Teachify-API-Key header. See the API Overview for details.

The Consulting Services API allows you to retrieve information about consulting services in your school. A consulting service is a bookable offering, typically attached to a course and assigned to a lecturer, under which individual consulting meetings (time slots) are scheduled.

Both queries require the courses:read scope.

Returns a paginated list of consulting services for the authenticated school, ordered by creation time (newest first) — createdAt DESC, id DESC. The id tiebreak keeps paging stable when two services share a creation timestamp.

Parameters:

ParameterTypeDescription
filterAdminConsultingServiceFilterFilter criteria (see Filtering)
pageIntPage number for pagination
perPageIntNumber of items per page (default: 20, max: 50)
limitIntAlternative to perPage

Returns:

  • AdminConsultingServicePage object with:
    • nodes: Array of AdminConsultingService objects
    • currentPage: Current page number
    • hasNextPage: Whether there are more pages
    • hasPreviousPage: Whether there are previous pages
    • nodesCount: Total number of items matching the query
    • totalPages: Total number of pages

Example:

query {
consultingServices(
page: 1,
perPage: 10
) {
nodes {
id
name
slug
published
publishedAt
courseId
lecturerId
effectiveTimezone
meetingCount
createdAt
updatedAt
lecturer {
id
name
}
}
currentPage
hasNextPage
hasPreviousPage
nodesCount
totalPages
}
}

Returns a single consulting service by ID, scoped to the current organization. Returns null if the service is not found or does not belong to this school.

Parameters:

ParameterTypeDescription
idString!The unique identifier of the consulting service

Returns:

  • A single AdminConsultingService object, or null if not found.

Example:

query {
consultingService(id: "service-123") {
id
name
slug
description
published
effectiveTimezone
tags
ratingFormId
lecturer {
id
name
}
meetingCount(state: scheduled)
}
}

The AdminConsultingService object contains the following fields:

FieldTypeDescription
idString!Unique identifier
nameString!Display name of the consulting service
slugString!URL-friendly identifier (scoped to the school)
descriptionStringDescription of the consulting service
publishedBoolean!Whether the service is marked as published
publishedAtIntUnix timestamp; null if never published
tags[String!]Tag list stored in settings JSON
backgroundColorStringUI background color (hex)
ratingFormIdStringID of the linked rating form, if any
ratingFormFormThe custom rating form configured for this service. Null means the default rating (score 0.5-10 + comment) is used. Its fields define what an integrator must submit when rating a meeting under this service
courseIdStringID of the parent course (target). Use the courses admin query to resolve details
lecturerIdStringID of the assigned lecturer. Use the lecturers admin query to resolve details
lecturerAdminLecturerAssigned lecturer object (preferred over lecturerId for one-shot fetches)
effectiveTimezoneString!IANA timezone string (e.g. Asia/Taipei). Use when converting local datetimes to Unix timestamps for consulting meeting startedAt/endedAt inputs
meetingCountInt!Number of undiscarded meetings under this service, optionally filtered by state (see below)
discardedAtIntUnix timestamp; non-null when soft-deleted
createdAtInt!Unix Timestamp. When the service was created
updatedAtInt!Unix Timestamp. When the service was last updated

The meetingCount field accepts an optional argument to scope the count to a single meeting state:

ArgumentTypeDescription
stateAdminMeetingStateFilter the count to a single AASM state (available, scheduled, canceled)

The consultingServices query accepts a filter parameter of type AdminConsultingServiceFilter. This allows you to narrow down results based on the following criteria.

Filter FieldTypeDescription
courseIdStringFilter by parent course ID
slugStringExact slug match (school-scoped)
publishedBooleanFilter by published flag. Checks the published column directly, not the time-gated effective published state — so a service with published: true and a future publishedAt still matches published: true
keywordStringCase-insensitive substring match against name or slug

Find published services for a specific course:

query {
consultingServices(
filter: {
courseId: "course-123",
published: true
}
) {
nodes {
id
name
slug
published
}
nodesCount
}
}

Search services by keyword:

query {
consultingServices(
filter: {
keyword: "coaching"
}
) {
nodes {
id
name
slug
}
nodesCount
}
}