BlueSuite Developers
REST API v1

Service plans

Service plans in the BlueSuite REST API

A service plan defines recurring billing and optional visits. Creating or editing a plan does not subscribe or charge a customer.

Billing cadence and visit cadence are independent. Use no_appointments: true for billing-only plans. A fixed_end_date duration requires duration_end_date, including when updating or activating an existing plan. Status is draft, active, or archived.

For existing customers enrolled in a plan, use Service-plan subscriptions.

GET /api/v1/service-plans

GET /api/v1/service-plans

Required scopes: service_plans:read.

Query parameters

FieldType / accepted valuesRequiredDetails
pageintegerNoPage number, starting at 1. Default: 1.
per_pageintegerNoRecords per page, from 1 to 100. Default: 25. minimum: 1. maximum: 100.
searchstringNoSearch text. maxLength: 100.
sort_bystringNoSort column. See the supported columns below when listed.
sort_direction"asc", "desc"NoSort direction. Default: "desc".
statusstringNoFilter by status.

Response

200 with { "success": true, "data": [...], "pagination": { "page": 1, "per_page": 25, "total_pages": 1 } }.

See response conventions and errors.

POST /api/v1/service-plans

POST /api/v1/service-plans

Required scopes: service_plans:write.

JSON body

FieldType / accepted valuesRequiredDetails
namestringYesminLength: 1.
descriptionstring or nullNo
billing_amountnumberNoDefault: 0. minimum: 0.
billing_cycle"weekly", "monthly", "quarterly", "semi_annually", "annually"NoDefault: "monthly".
billing_timing"start", "end"NoDefault: "start".
duration_type"until_cancelled", "fixed_end_date"NoDefault: "until_cancelled".
duration_end_datestring or nullNo
visit_recurrence_frequencyintegerNoDefault: 1.
visit_recurrence_unit"daily", "weekly", "monthly", "yearly", "custom", "forever", "occurrences"NoDefault: "monthly".
visit_recurrence_scheduleJSON value or nullNo
no_appointmentsbooleanNoDefault: false.
tax_ratenumberNoDefault: 0. minimum: 0.
tax_rate_idinteger or nullNo
termsstring or nullNo
default_account_manager_idstring or nullNo
addonsJSON value or nullNo
status"draft", "active", "archived"NoDefault: "draft".

Unknown body fields are rejected. Conditional requirements are explained above.

Response

201 with { "success": true, "data": ... }. The data contains the result of the operation.

See response conventions and errors.

GET /api/v1/service-plans/:id

GET /api/v1/service-plans/:id

Required scopes: service_plans:read.

Path parameters: id. Use positive integer record IDs from this workspace.

Response

200 with { "success": true, "data": ... }. The data contains the result of the operation.

See response conventions and errors.

PUT /api/v1/service-plans/:id

PUT /api/v1/service-plans/:id

Required scopes: service_plans:write.

Path parameters: id. Use positive integer record IDs from this workspace.

JSON body

FieldType / accepted valuesRequiredDetails
namestringNominLength: 1.
descriptionstring or nullNo
billing_amountnumberNoDefault: 0. minimum: 0.
billing_cycle"weekly", "monthly", "quarterly", "semi_annually", "annually"NoDefault: "monthly".
billing_timing"start", "end"NoDefault: "start".
duration_type"until_cancelled", "fixed_end_date"NoDefault: "until_cancelled".
duration_end_datestring or nullNo
visit_recurrence_frequencyintegerNoDefault: 1.
visit_recurrence_unit"daily", "weekly", "monthly", "yearly", "custom", "forever", "occurrences"NoDefault: "monthly".
visit_recurrence_scheduleJSON value or nullNo
no_appointmentsbooleanNoDefault: false.
tax_ratenumberNoDefault: 0. minimum: 0.
tax_rate_idinteger or nullNo
termsstring or nullNo
default_account_manager_idstring or nullNo
addonsJSON value or nullNo
status"draft", "active", "archived"NoDefault: "draft".

Unknown body fields are rejected. Conditional requirements are explained above.

Response

200 with { "success": true, "data": ... }. The data contains the result of the operation.

See response conventions and errors.

DELETE /api/v1/service-plans/:id

DELETE /api/v1/service-plans/:id

Required scopes: service_plans:write.

Path parameters: id. Use positive integer record IDs from this workspace.

No request body.

Response

200 with { "success": true, "data": ... }. The data contains the result of the operation.

See response conventions and errors.

PUT /api/v1/service-plans/:id/status

PUT /api/v1/service-plans/:id/status

Required scopes: service_plans:write.

Path parameters: id. Use positive integer record IDs from this workspace.

JSON body

FieldType / accepted valuesRequiredDetails
status"draft", "active", "archived"Yes

Unknown body fields are rejected. Conditional requirements are explained above.

Response

200 with { "success": true, "data": ... }. The data contains the result of the operation.

See response conventions and errors.

On this page