solarOS Organization API

Organization API

Create a Service Appointment

Creates one interval-first Service Appointment for an accessible Work Order. scheduledStart, scheduledEnd, and timezone are required; durationMinutes is derived. Optional estimatedDurationMinutes is accepted only when it exactly matches the interval. Customer-facing windows must contain the exact scheduled interval. Assignment requires active same-organization schedulable Team Members (Service Resources) and a primary member included in the assigned set. Overlaps return structured warnings and do not block writes by themselves. Requires Idempotency-Key and service_appointments:write.

/api/v1/service-appointments

Creates one interval-first Service Appointment for an accessible Work Order. scheduledStart, scheduledEnd, and timezone are required; durationMinutes is derived. Optional estimatedDurationMinutes is accepted only when it exactly matches the interval. Customer-facing windows must contain the exact scheduled interval. Assignment requires active same-organization schedulable Team Members (Service Resources) and a primary member included in the assigned set. Overlaps return structured warnings and do not block writes by themselves. Requires Idempotency-Key and service_appointments:write.

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

Required scopes

service_appointments:writeIdempotency-Key required

Parameters

No path or query parameters.

Request body

objectrequired
FieldTypeDescription
workOrderIdrequiredstringOptional unless marked required.
scheduledStartrequiredstringOptional unless marked required.
scheduledEndrequiredstringOptional unless marked required.
timezonerequiredstringOptional unless marked required.
customerWindowStartstring | nullOptional unless marked required.
customerWindowEndstring | nullOptional unless marked required.
assignedTeamMemberIds[]requiredarray<string>Optional unless marked required.
primaryTeamMemberIdrequiredstringOptional unless marked required.
notesstring | nullOptional unless marked required.
schedulingConfidenceTENTATIVELY_SCHEDULED | CONFIDENTLY_SCHEDULED | CONFIRMEDOptional unless marked required.
estimatedDurationMinutesintegerOptional unless marked required.
createserviceappointmentRequest
{
  "workOrderId": "work_order_123",
  "scheduledStart": "2026-08-13T16:00:00Z",
  "scheduledEnd": "2026-08-13T20:00:00Z",
  "timezone": "America/Los_Angeles",
  "assignedTeamMemberIds": [
    "team_member_123"
  ],
  "primaryTeamMemberId": "team_member_123"
}

Responses

201

Created Service Appointment envelope with warnings

#/components/schemas/OrgApiResourceEnvelope

400

Validation or idempotency error

#/components/schemas/OrgApiError

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:write

#/components/schemas/OrgApiError

404

Work Order not found

#/components/schemas/OrgApiError

409

Idempotency conflict

#/components/schemas/OrgApiError

429

Rate limit exceeded

#/components/schemas/OrgApiError

Errors

400 Validation or idempotency error401 Missing or invalid organization API key402 Organization billing access or an endpoint-specific business quota denied the request403 Missing required scope: service_appointments:write404 Work Order not found409 Idempotency conflict429 Rate limit exceeded

Static examples

curl -X POST "$SOLAROS_BASE_URL/api/v1/service-appointments" \
  -H "Authorization: Bearer $SOLAROS_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $SOLAROS_IDEMPOTENCY_KEY" \
  --data '{"workOrderId":"work_order_123","scheduledStart":"2026-08-13T16:00:00Z","scheduledEnd":"2026-08-13T20:00:00Z","timezone":"America/Los_Angeles","assignedTeamMemberIds":["team_member_123"],"primaryTeamMemberId":"team_member_123"}'