DevelopersAPI reference

Service types API

REST endpoints for service types in ServFlo: 4 operations with parameters, request and response fields, permissions and curl examples.

Base URL: https://app.servflo.ai/api. Every call needs Authorization: Bearer sfk_… (Authentication); {organizationId} ($ORGANIZATION_ID in the examples) is your business's id.

OperationEndpointRisk
List service typesGET /organizations/{organizationId}/service-typesread
Create a service typePOST /organizations/{organizationId}/service-typeswrite
Update a service typePATCH /organizations/{organizationId}/service-types/{serviceTypeId}write
Delete a service typeDELETE /organizations/{organizationId}/service-types/{serviceTypeId}sensitive

List service types

GET /organizations/{organizationId}/service-types

The kinds of work the business does, with default duration (minutes), default price (cents) and colour. Seeded with six on first read. Read-only.

Permissioncatalog.read (Owner, Admin, Dispatcher, Technician, Member)
Riskread, OAuth scope servflo.read. Read: reads only.
MCP toolserviceTypes_list (toolset pricebook, in the default set)

Example

curl "https://app.servflo.ai/api/organizations/$ORGANIZATION_ID/service-types" \
  -H "Authorization: Bearer $SERVFLO_API_KEY"

Response

200: the answer's fields

An array of objects:

FieldTypeDescription
idstringService type id.
organizationIdstring
namestring
descriptionstring or null
defaultDurationintegerDefault job length in minutes.
defaultPriceCentsintegerDefault job price, in integer cents.
colorstring
onlineBookablebooleanOffered on the public booking form.
serviceIntervalDaysinteger or null
defaultBusinessUnitIdstring or null
weatherSensitivebooleanOutdoor work that plans around the weather.
weatherMaxRainChanceinteger or nullRain chance limit (%); null = 50.
weatherMaxWindMphinteger or nullWind limit (mph); null = 25.
weatherMinTempFinteger or null
weatherMaxTempFinteger or null
createdAtstring (date-time)
updatedAtstring (date-time)

Create a service type

POST /organizations/{organizationId}/service-types

Adds a service type. A duration of 0 becomes 60 minutes. Returns it.

Permissioncatalog.write (Owner, Admin)
Riskwrite, OAuth scope servflo.write. Write: creates or changes records inside the business; nothing leaves it.
MCP toolserviceTypes_create (toolset pricebook)

Request body

FieldTypeRequiredDescription
namestringYes
descriptionstring or nullNo
defaultDurationintegerNo-100000–100000.
defaultPriceCentsintegerNoMoney in integer cents (12500 = 125.00). -100000000–100000000.
colorstringNo
onlineBookablebooleanNoOffered on the public booking form and widgets (default true).
serviceIntervalDaysinteger or nullNoHow often this service is usually repeated, in days (e.g. 180 for twice a year); used by the "service due" prediction. Null: no usual interval. 1–3650.
defaultBusinessUnitIdstring or nullNoThe business unit its jobs, requests and quotes default to (GET /business-units); null = none. An inactive or non-bookable unit takes it off the online booking form. Up to 100 characters.
weatherSensitivebooleanNoOutdoor work that plans around the weather: its jobs show the forecast and the office is alerted when it turns bad (Pro). Omitted on create: set from the name and the trade (e.g. Gutter cleaning).
weatherMaxRainChanceinteger or nullNoA visit is BAD at or above this chance of rain (%); null = 50. 0–100.
weatherMaxWindMphinteger or nullNoBAD at or above this wind in mph (gusts count at 75 %); null = 25. 1–150.
weatherMinTempFinteger or nullNoBAD below this temperature (°F); null = no limit. -60–130.
weatherMaxTempFinteger or nullNoBAD above this temperature (°F); null = no limit. -60–140.

Example

curl -X POST "https://app.servflo.ai/api/organizations/$ORGANIZATION_ID/service-types" \
  -H "Authorization: Bearer $SERVFLO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Dana Whitfield"}'

Response

201: the answer's fields
FieldTypeDescription
idstringService type id.
organizationIdstring
namestring
descriptionstring or null
defaultDurationintegerDefault job length in minutes.
defaultPriceCentsintegerDefault job price, in integer cents.
colorstring
onlineBookablebooleanOffered on the public booking form.
serviceIntervalDaysinteger or null
defaultBusinessUnitIdstring or null
weatherSensitivebooleanOutdoor work that plans around the weather.
weatherMaxRainChanceinteger or nullRain chance limit (%); null = 50.
weatherMaxWindMphinteger or nullWind limit (mph); null = 25.
weatherMinTempFinteger or null
weatherMaxTempFinteger or null
createdAtstring (date-time)
updatedAtstring (date-time)

Update a service type

PATCH /organizations/{organizationId}/service-types/{serviceTypeId}

Changes the fields sent. Existing jobs keep their own price and duration. Returns it.

Permissioncatalog.write (Owner, Admin)
Riskwrite, OAuth scope servflo.write. Write: creates or changes records inside the business; nothing leaves it.
MCP toolserviceTypes_update (toolset pricebook)

Parameters

NameInTypeRequiredDescription
serviceTypeIdpathstringYes

Request body

FieldTypeRequiredDescription
namestringNo
descriptionstring or nullNo
defaultDurationintegerNo-100000–100000.
defaultPriceCentsintegerNoMoney in integer cents (12500 = 125.00). -100000000–100000000.
colorstringNo
onlineBookablebooleanNoOffered on the public booking form and widgets (default true).
serviceIntervalDaysinteger or nullNoHow often this service is usually repeated, in days (e.g. 180 for twice a year); used by the "service due" prediction. Null: no usual interval. 1–3650.
defaultBusinessUnitIdstring or nullNoThe business unit its jobs, requests and quotes default to (GET /business-units); null = none. An inactive or non-bookable unit takes it off the online booking form. Up to 100 characters.
weatherSensitivebooleanNoOutdoor work that plans around the weather: its jobs show the forecast and the office is alerted when it turns bad (Pro). Omitted on create: set from the name and the trade (e.g. Gutter cleaning).
weatherMaxRainChanceinteger or nullNoA visit is BAD at or above this chance of rain (%); null = 50. 0–100.
weatherMaxWindMphinteger or nullNoBAD at or above this wind in mph (gusts count at 75 %); null = 25. 1–150.
weatherMinTempFinteger or nullNoBAD below this temperature (°F); null = no limit. -60–130.
weatherMaxTempFinteger or nullNoBAD above this temperature (°F); null = no limit. -60–140.

Example

curl -X PATCH "https://app.servflo.ai/api/organizations/$ORGANIZATION_ID/service-types/{serviceTypeId}" \
  -H "Authorization: Bearer $SERVFLO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Dana Whitfield","description":"string","defaultDuration":1}'

Response

200: the answer's fields
FieldTypeDescription
idstringService type id.
organizationIdstring
namestring
descriptionstring or null
defaultDurationintegerDefault job length in minutes.
defaultPriceCentsintegerDefault job price, in integer cents.
colorstring
onlineBookablebooleanOffered on the public booking form.
serviceIntervalDaysinteger or null
defaultBusinessUnitIdstring or null
weatherSensitivebooleanOutdoor work that plans around the weather.
weatherMaxRainChanceinteger or nullRain chance limit (%); null = 50.
weatherMaxWindMphinteger or nullWind limit (mph); null = 25.
weatherMinTempFinteger or null
weatherMaxTempFinteger or null
createdAtstring (date-time)
updatedAtstring (date-time)

Delete a service type

DELETE /organizations/{organizationId}/service-types/{serviceTypeId}

Destructive: deletes the service type; jobs and requests that used it keep their data without it.

Permissioncatalog.write (Owner, Admin)
Risksensitive, OAuth scope servflo.sensitive. Sensitive: moves money, deletes, sends or shows something to a customer, or grants or revokes access.
MCP toolserviceTypes_delete (toolset pricebook)
ApprovalOver MCP, this tool always waits for your approval in ServFlo. See Approvals.

Parameters

NameInTypeRequiredDescription
serviceTypeIdpathstringYes

Example

curl -X DELETE "https://app.servflo.ai/api/organizations/$ORGANIZATION_ID/service-types/{serviceTypeId}" \
  -H "Authorization: Bearer $SERVFLO_API_KEY"

Response

200: the answer's fields
FieldTypeDescription
oktrue

On this page