solarOS Organization API

Organization API

Create an External Reference

Creates or replays one tenant-scoped External Reference for a solarOS resource. Replays return the existing reference when the tuple already points at the same resource; conflicts return 409. Required scope: external_references:write.

/api/v1/external-references

Creates or replays one tenant-scoped External Reference for a solarOS resource. Replays return the existing reference when the tuple already points at the same resource; conflicts return 409. Required scope: external_references:write.

Create an External Reference. Use an organization API key with external_references:write. Check the response envelope and meta.requestId before triggering dependent workflow steps.

Required scopes

external_references:write

Parameters

No path or query parameters.

Request body

objectrequired
FieldTypeDescription
resourceTyperequiredstringOptional unless marked required.
resourceIdrequiredstringOptional unless marked required.
externalSystemrequiredstringOptional unless marked required.
externalObjectrequiredstringOptional unless marked required.
externalIdrequiredstringOptional unless marked required.
metadataobjectOptional unless marked required.
createexternalreferenceRequest
{
  "resourceType": "WorkOrder",
  "resourceId": "work_order_123",
  "externalSystem": "salesforce",
  "externalObject": "WorkOrder",
  "externalId": "0WO123"
}

Responses

200

Existing matching External Reference envelope

#/components/schemas/OrgApiResourceEnvelope

201

External Reference created envelope

#/components/schemas/OrgApiResourceEnvelope

400

Invalid External Reference payload

#/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 external_references:write scope

#/components/schemas/OrgApiError

409

External Reference tuple already points elsewhere

#/components/schemas/OrgApiError

429

Rate limit exceeded

#/components/schemas/OrgApiError

Errors

400 Invalid External Reference payload401 Missing or invalid organization API key402 Organization billing access or an endpoint-specific business quota denied the request403 Missing external_references:write scope409 External Reference tuple already points elsewhere429 Rate limit exceeded

Static examples

curl -X POST "$SOLAROS_BASE_URL/api/v1/external-references" \
  -H "Authorization: Bearer $SOLAROS_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{"resourceType":"WorkOrder","resourceId":"work_order_123","externalSystem":"salesforce","externalObject":"WorkOrder","externalId":"0WO123"}'