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/graphql— not/graphql, which is the public school API. Authenticate with ansk_live_…API key in theX-Teachify-API-Keyheader. See the API Overview for details.
Overview
Section titled “Overview”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.
Available Queries
Section titled “Available Queries”consultingServices
Section titled “consultingServices”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:
| Parameter | Type | Description |
|---|---|---|
filter | AdminConsultingServiceFilter | Filter criteria (see Filtering) |
page | Int | Page number for pagination |
perPage | Int | Number of items per page (default: 20, max: 50) |
limit | Int | Alternative to perPage |
Returns:
- AdminConsultingServicePage object with:
nodes: Array of AdminConsultingService objectscurrentPage: Current page numberhasNextPage: Whether there are more pageshasPreviousPage: Whether there are previous pagesnodesCount: Total number of items matching the querytotalPages: 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 }}consultingService
Section titled “consultingService”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:
| Parameter | Type | Description |
|---|---|---|
id | String! | The unique identifier of the consulting service |
Returns:
- A single AdminConsultingService object, or
nullif not found.
Example:
query { consultingService(id: "service-123") { id name slug description published effectiveTimezone tags ratingFormId lecturer { id name } meetingCount(state: scheduled) }}ConsultingService Object
Section titled “ConsultingService Object”The AdminConsultingService object contains the following fields:
| Field | Type | Description |
|---|---|---|
id | String! | Unique identifier |
name | String! | Display name of the consulting service |
slug | String! | URL-friendly identifier (scoped to the school) |
description | String | Description of the consulting service |
published | Boolean! | Whether the service is marked as published |
publishedAt | Int | Unix timestamp; null if never published |
tags | [String!] | Tag list stored in settings JSON |
backgroundColor | String | UI background color (hex) |
ratingFormId | String | ID of the linked rating form, if any |
ratingForm | Form | The 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 |
courseId | String | ID of the parent course (target). Use the courses admin query to resolve details |
lecturerId | String | ID of the assigned lecturer. Use the lecturers admin query to resolve details |
lecturer | AdminLecturer | Assigned lecturer object (preferred over lecturerId for one-shot fetches) |
effectiveTimezone | String! | IANA timezone string (e.g. Asia/Taipei). Use when converting local datetimes to Unix timestamps for consulting meeting startedAt/endedAt inputs |
meetingCount | Int! | Number of undiscarded meetings under this service, optionally filtered by state (see below) |
discardedAt | Int | Unix timestamp; non-null when soft-deleted |
createdAt | Int! | Unix Timestamp. When the service was created |
updatedAt | Int! | Unix Timestamp. When the service was last updated |
meetingCount argument
Section titled “meetingCount argument”The meetingCount field accepts an optional argument to scope the count to a single meeting state:
| Argument | Type | Description |
|---|---|---|
state | AdminMeetingState | Filter the count to a single AASM state (available, scheduled, canceled) |
Filtering
Section titled “Filtering”The consultingServices query accepts a filter parameter of type AdminConsultingServiceFilter. This allows you to narrow down results based on the following criteria.
Available Filters
Section titled “Available Filters”| Filter Field | Type | Description |
|---|---|---|
courseId | String | Filter by parent course ID |
slug | String | Exact slug match (school-scoped) |
published | Boolean | Filter 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 |
keyword | String | Case-insensitive substring match against name or slug |
Filter Examples
Section titled “Filter Examples”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 }}