Skip to main content
Service plans

Schedule a service plan: activate it and generate its jobs

POST
/service-plans/{id}/schedule
Authorizationstringheaderrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

idstringrequired

Body

application/json
first_visitobject

Required unless mode is pending, where it is not allowed.

interval_days_of_weekinteger[]

Weekdays 0-6 (Sunday = 0). Only for a week plan.

Maximum array length: 7
interval_weeks_of_monthinteger[]

Weeks of the month 1-5. Only for a month plan.

Maximum array length: 5
modeenum<string>required

pending: activate with unscheduled jobs. first_only: schedule the first visit. all: schedule every visit.

Available options: pending, first_only, all
notify_assigneesboolean

Default false.

notify_customerbooleandefault:false

Default false: the customer is not notified. Ignored for pending.

Response

application/json

The scheduled service plan

X-RateLimit-Limitintegerheader

The company's daily request limit.

X-RateLimit-Remainingintegerheader

Requests left in the current daily window.

X-RateLimit-Resetstringheader

When the daily window resets (UTC ISO timestamp).

X-RateLimit-Minute-Limitintegerheader

The company's per-minute request limit.

X-RateLimit-Minute-Remainingintegerheader

Requests left in the current minute.

X-RateLimit-Minute-Resetstringheader

When the minute window resets (UTC ISO timestamp).

activebooleanrequired
auto_renewbooleanrequired
billing_modeenum<string>required
Available options: after_jobs, cycle, start_of_month
cancelledbooleanrequired
cancelled_atstring | nullrequired
cancelled_reasonstring | nullrequired
created_atstringrequired
customerobject | nullrequired
cycle_idsstring[]required
discountsobject[]required
end_datestring | nullrequired
frequencyobjectrequired
from_quote_idstring | nullrequired
has_payment_methodbooleanrequired
idstringrequired
is_auto_paybooleanrequired
is_signedbooleanrequired
job_countsobjectrequired

Live jobs by status (archived and quote jobs excluded): scheduled is Scheduled or In Progress, completed is Completed, pending is Pending. A plan with no jobs yet (not scheduled) projects pending from its length; cancelled jobs are not counted.

line_itemsobject[]required
namestring | nullrequired
notesstring | nullrequired
property_addressobjectrequired
sale_valuenumber | nullrequired
service_length_monthsintegerrequired
service_typesstring[]required
sold_byobject | nullrequired
start_datestringrequired
tax_rate_idstring | nullrequired
total_receivednumberrequired