solarOS Organization API

Organization API

Cancel a Work Order

Explicitly cancels a project-contained Work Order through app domain services. Requires Idempotency-Key. Side effects include entitlement unlink/sync, Project Item sync, audit, domain event, usage, and action response. Required scope: work_orders:cancel. reason is stored as the Work Order's cancelReason.

/api/v1/work-orders/{id}/cancel

Explicitly cancels a project-contained Work Order through app domain services. Requires Idempotency-Key. Side effects include entitlement unlink/sync, Project Item sync, audit, domain event, usage, and action response. Required scope: work_orders:cancel. reason is stored as the Work Order's cancelReason.

Cancel a Work Order. Use an organization API key with work_orders:cancel. Check the response envelope and meta.requestId before triggering dependent workflow steps.

Required scopes

work_orders:cancelIdempotency-Key required

Parameters

NameInTypeDescription
idrequiredpathstringWork Order identifier returned by the Organization API.

Request body

objectrequired
FieldTypeDescription
reasonstring | nullOptional unless marked required.
cancelworkorderRequest
{
  "reason": "Customer requested reschedule."
}

Responses

200

Work Order cancellation 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: work_orders: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: work_orders:cancel429 Rate limit exceeded

Static examples

curl -X POST "$SOLAROS_BASE_URL/api/v1/work-orders/$SOLAROS_WORK_ORDER/cancel" \
  -H "Authorization: Bearer $SOLAROS_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $SOLAROS_IDEMPOTENCY_KEY" \
  --data '{"reason":"Customer requested reschedule."}'