solarOS Organization API

Organization API

Create a draft Quote

Creates DRAFT Quotes only. Requires Idempotency-Key. Validates accessible Customer/Property/Opportunity, active Quote Type/Template, owner defaults, placed custom Fields, External References, audit, and domain events. ownerId is create-only in v1; generic Quote PATCH cannot reassign ownership. Without originatorId, the Quote takes its Opportunity's Originator, or credits its owner when it has no Opportunity. An answer in customFields to a Property Field (see isPropertyField) becomes the Property's answer, is recorded in its history, and fills that Field on the Property's draft Quotes and open Projects where it is still blank; a Quote Template's default is not an answer. Required scope: quotes:write.

/api/v1/quotes

Creates DRAFT Quotes only. Requires Idempotency-Key. Validates accessible Customer/Property/Opportunity, active Quote Type/Template, owner defaults, placed custom Fields, External References, audit, and domain events. ownerId is create-only in v1; generic Quote PATCH cannot reassign ownership. Without originatorId, the Quote takes its Opportunity's Originator, or credits its owner when it has no Opportunity. An answer in customFields to a Property Field (see isPropertyField) becomes the Property's answer, is recorded in its history, and fills that Field on the Property's draft Quotes and open Projects where it is still blank; a Quote Template's default is not an answer. Required scope: quotes:write.

Create a draft Quote. Use an organization API key with quotes:write. Check the response envelope and meta.requestId before triggering dependent workflow steps.

Required scopes

quotes:writeIdempotency-Key required

Parameters

No path or query parameters.

Request body

objectrequired
FieldTypeDescription
namerequiredstringOptional unless marked required.
customerIdrequiredstringOptional unless marked required.
propertyIdstring | nullOptional unless marked required.
opportunityIdstring | nullOptional unless marked required.
quoteTypeIdrequiredstringOptional unless marked required.
quoteTemplateIdstring | nullOptional unless marked required.
validUntilstring | nullOptional unless marked required.
summarystring | nullOptional unless marked required.
notesstring | nullOptional unless marked required.
termsstring | nullOptional unless marked required.
ownerIdstring | 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.
originatorIdstring | nullThe active or draft same-organization Team Member credited with bringing this sale in. When omitted, the Quote takes its Opportunity's Originator, or credits its owner when it has no Opportunity.
customFieldsobjectField Values keyed by savedIdentity from GET /api/v1/schema.
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.
createquoteRequest
{
  "customerId": "customer_123",
  "propertyId": "property_123",
  "opportunityId": "opportunity_123",
  "quoteTypeId": "quote_type_123",
  "quoteTemplateId": "quote_template_123",
  "name": "8.4 kW solar proposal"
}

Responses

201

Created Quote envelope

#/components/schemas/OrgApiResourceEnvelope

400

Validation, owner, or custom Field 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: quotes:write

#/components/schemas/OrgApiError

409

Idempotency or External Reference conflict

#/components/schemas/OrgApiError

429

Rate limit exceeded

#/components/schemas/OrgApiError

Errors

400 Validation, owner, or custom Field error401 Missing or invalid organization API key402 Organization billing access or an endpoint-specific business quota denied the request403 Missing required scope: quotes:write409 Idempotency or External Reference conflict429 Rate limit exceeded

Static examples

curl -X POST "$SOLAROS_BASE_URL/api/v1/quotes" \
  -H "Authorization: Bearer $SOLAROS_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $SOLAROS_IDEMPOTENCY_KEY" \
  --data '{"customerId":"customer_123","propertyId":"property_123","opportunityId":"opportunity_123","quoteTypeId":"quote_type_123","quoteTemplateId":"quote_template_123","name":"8.4 kW solar proposal"}'