solarOSsolarOS Docs

Save Case Field Values

Writes registered Field Values by key. Set preserveExisting to fill only unanswered Fields, preserving zero, false, and existing answers even during concurrent edits. Omitted keys remain unchanged. With preserveExisting false (the default), null clears an answer. Saves follow normal Case inheritance into unanswered draft Quote and Project Fields. GET /cases/{id} returns the values in customFields.

PATCH
/cases/{id}/fields

Writes registered Field Values by key. Set preserveExisting to fill only unanswered Fields, preserving zero, false, and existing answers even during concurrent edits. Omitted keys remain unchanged. With preserveExisting false (the default), null clears an answer. Saves follow normal Case inheritance into unanswered draft Quote and Project Fields. GET /cases/{id} returns the values in customFields.

Authorization

Authorization<token>

Organization API key. Format: Bearer sk_live_...

In: header

Path Parameters

id*string

Case identifier returned by the Organization API.

Request Body

application/json

JSON request payload for updateCaseFields.

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/cases/string/fields" \  -H "Content-Type: application/json" \  -d '{    "values": {      "storyCount": 2,      "roofPitch": "4_12",      "panelCount": 18    },    "preserveExisting": true  }'
{  "data": {    "customFields": {},    "updatedFields": [      "string"    ]  }}