solarOS Organization API

Organization API

Create or update a Customer Relationship

Creates or updates the organization-scoped Customer Relationship sidecar for a Customer this organization already serves, or one it deleted, which restores them. firstName, lastName, and phone change the shared Customer only when this organization alone holds that Customer and it has no portal account. Otherwise they are saved on this relationship, read back as displayName and phone, and the shared Customer and every other organization stay as they were. Returns 404 when the Customer does not exist or was merged into another. Requires Idempotency-Key. Required scope: customers:write.

/api/v1/customer-relationships

Creates or updates the organization-scoped Customer Relationship sidecar for a Customer this organization already serves, or one it deleted, which restores them. firstName, lastName, and phone change the shared Customer only when this organization alone holds that Customer and it has no portal account. Otherwise they are saved on this relationship, read back as displayName and phone, and the shared Customer and every other organization stay as they were. Returns 404 when the Customer does not exist or was merged into another. Requires Idempotency-Key. Required scope: customers:write.

Create or update a Customer Relationship. Use an organization API key with customers:write. Check the response envelope and meta.requestId before triggering dependent workflow steps.

Required scopes

customers:writeIdempotency-Key required

Parameters

No path or query parameters.

Request body

objectrequired
FieldTypeDescription
customerIdrequiredstringOptional unless marked required.
customerSalesforceAccountIdstring | nullOptional unless marked required.
billingEmailstring | nullInvoice recipient for this organization. Blank or null uses the contact email.
emailstring | nullOptional unless marked required.
firstNamestring | nullOptional unless marked required.
lastNamestring | nullOptional unless marked required.
ownerTeamMemberIdstring | nullActive or draft same-organization Team Member id. When omitted, the API key default owner for this resource is used. Ownership cannot be changed through generic PATCH endpoints.
phonestring | nullOptional unless marked required.
externalReferences[]array<object>Optional unless marked required.
externalReferences[].externalSystemrequiredstringOptional unless marked required.
externalReferences[].externalObjectrequiredstringOptional unless marked required.
externalReferences[].externalIdrequiredstringOptional unless marked required.
externalReferences[].metadataobjectOptional unless marked required.
createcustomerrelationshipRequest
{
  "customerId": "customer_123",
  "ownerTeamMemberId": "team_member_123"
}

Responses

201

Customer Relationship envelope

#/components/schemas/OrgApiResourceEnvelope

400

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

#/components/schemas/OrgApiError

404

Customer not found

#/components/schemas/OrgApiError

429

Rate limit exceeded

#/components/schemas/OrgApiError

Errors

400 Validation error401 Missing or invalid organization API key402 Organization billing access or an endpoint-specific business quota denied the request403 Missing required scope: customers:write404 Customer not found429 Rate limit exceeded

Static examples

curl -X POST "$SOLAROS_BASE_URL/api/v1/customer-relationships" \
  -H "Authorization: Bearer $SOLAROS_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $SOLAROS_IDEMPOTENCY_KEY" \
  --data '{"customerId":"customer_123","ownerTeamMemberId":"team_member_123"}'