solarOS Organization API

Organization API

Cancel a Service Appointment

Transitions an appointment to CANCELLED. The optional body accepts notes and a reason enum; it does not accept arbitrary timestamps or assignee fields.

/api/v1/service-appointments/{id}/cancel

Transitions an appointment to CANCELLED. The optional body accepts notes and a reason enum; it does not accept arbitrary timestamps or assignee fields.

Cancel a Service Appointment. Use an organization API key with service_appointments:cancel. Check the response envelope and meta.requestId before triggering dependent workflow steps.

Required scopes

service_appointments:cancelIdempotency-Key required

Parameters

NameInTypeDescription
idrequiredpathstringService Appointment identifier returned by the Organization API.

Request body

object
FieldTypeDescription
completedAtstring | nullOptional unless marked required.
notesstring | nullOptional unless marked required.
reasonCUSTOMER_REQUEST | TECH_UNAVAILABLE | WEATHER | RESCHEDULED | NO_SHOW | OTHEROptional unless marked required.
cancelserviceappointmentRequest
{
  "reason": "WEATHER",
  "notes": "Unsafe roof conditions."
}

Responses

200

Cancel action envelope

#/components/schemas/OrgApiActionEnvelope

401

Missing or invalid organization API key

#/components/schemas/OrgApiError

402

Organization billing access or an endpoint-specific business quota denied the request

#/components/schemas/OrgApiError

403

Missing required scope: service_appointments:cancel

#/components/schemas/OrgApiError

429

Rate limit exceeded

#/components/schemas/OrgApiError

Errors

401 Missing or invalid organization API key402 Organization billing access or an endpoint-specific business quota denied the request403 Missing required scope: service_appointments:cancel429 Rate limit exceeded

Static examples

curl -X POST "$SOLAROS_BASE_URL/api/v1/service-appointments/$SOLAROS_SERVICE_APPOINTMENT/cancel" \
  -H "Authorization: Bearer $SOLAROS_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $SOLAROS_IDEMPOTENCY_KEY" \
  --data '{"reason":"WEATHER","notes":"Unsafe roof conditions."}'