solarOS Organization API

Organization API

Update one Opportunity

Updates standard Opportunity fields, customFields, and the Originator. ownerId is create-only and is rejected on PATCH because Organization API v1 does not expose the staff reassignment action. originatorId credits a different Team Member, logged as an Originator change with its own opportunity.updated event; the Opportunity's Quotes keep the Originator they have. Quote lifecycle changes can also synchronize the linked Opportunity stage. No-op PATCH returns changed=false and does not emit audit/domain events.

/api/v1/opportunities/{id}

Updates standard Opportunity fields, customFields, and the Originator. ownerId is create-only and is rejected on PATCH because Organization API v1 does not expose the staff reassignment action. originatorId credits a different Team Member, logged as an Originator change with its own opportunity.updated event; the Opportunity's Quotes keep the Originator they have. Quote lifecycle changes can also synchronize the linked Opportunity stage. No-op PATCH returns changed=false and does not emit audit/domain events.

Update one Opportunity. Use an organization API key with opportunities:write. Check the response envelope and meta.requestId before triggering dependent workflow steps.

Required scopes

opportunities:write

Parameters

NameInTypeDescription
idrequiredpathstringOpportunity identifier returned by the Organization API.

Request body

objectrequired
FieldTypeDescription
namestringOptional unless marked required.
propertyIdstring | nullOptional unless marked required.
valuestring | number | nullOptional unless marked required.
stageNEW | PROPOSAL | NEGOTIATION | CLOSED_WON | CLOSED_LOSTOptional unless marked required.
expectedCloseDatestring | nullOptional unless marked required.
notesstring | nullOptional unless marked required.
originatorIdstringCredits a different active or draft same-organization Team Member, and writes its own activity entry and updated event. An Originator cannot be cleared. Naming a deactivated Team Member is refused unless they are already the Originator.
customFieldsobjectField Values keyed by savedIdentity from GET /api/v1/schema.
updateopportunityRequest
{
  "stage": "NEGOTIATION",
  "value": "43500"
}

Responses

200

Updated Opportunity envelope

#/components/schemas/OrgApiResourceEnvelope

400

Validation or ownership 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: opportunities:write

#/components/schemas/OrgApiError

429

Rate limit exceeded

#/components/schemas/OrgApiError

Errors

400 Validation or ownership error401 Missing or invalid organization API key402 Organization billing access or an endpoint-specific business quota denied the request403 Missing required scope: opportunities:write429 Rate limit exceeded

Static examples

curl -X PATCH "$SOLAROS_BASE_URL/api/v1/opportunities/$SOLAROS_OPPORTUNITY" \
  -H "Authorization: Bearer $SOLAROS_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{"stage":"NEGOTIATION","value":"43500"}'