A Service Time a person prefers to be scheduled to.
| Property | Value |
|---|---|
| Product | Services (pco.services, API version 2018-11-01) |
| Resource type | TimePreferenceOption |
| TypeScript | Services.TimePreferenceOption, attributes Services.TimePreferenceOptionAttributes, schema Services.TimePreferenceOptionSchema |
| Planning Center path | /services/v2/service_types/{service_type_id}/time_preference_options |
| Planning Center docs | TimePreferenceOption |
How to reach it
| Client path | Returns | Filters | Create |
|---|---|---|---|
pco.services.service_types.id(serviceTypeId).time_preference_options |
Collection | No |
From a collection, .id(timePreferenceOptionId) addresses one TimePreferenceOption: pco.services.service_types.id(serviceTypeId).time_preference_options.id(timePreferenceOptionId). Collections support where, include, order, and pagination; single resources have get().
Attributes
On Services.TimePreferenceOptionAttributes. Every resource also has id and type ('TimePreferenceOption') next to its attributes.
| Name | Type | Description |
|---|---|---|
created_at |
string | null |
|
day_of_week |
number | null |
|
description |
string | null |
|
minute_of_day |
number | null |
0 for 12:00 am, 1 for 12:01 am, 100 for 1:00 am, through 2359 for 11:59pm |
sort_index |
string | null |
|
starts_at |
string | null |
|
time_type |
string | null |
|
updated_at |
string | null |
Querying
No documented where fields.
Order
order(...) accepts these fields, ascending, or descending with a - prefix: day_of_week, hour_of_day.
Edges
This resource has no documented edges.
Writing
| Property | Value |
|---|---|
| Create | No |
| Update | No |
| Delete | No |
Example
import type { Services } from '@mackenly/planningcenterkit';
const serviceTypeId = '1'; // ServiceType id
const page = await pco.services.service_types.id(serviceTypeId).time_preference_options.order('day_of_week').perPage(25).list();
const items: Services.TimePreferenceOption[] = page.data;