Set Case Json Data Fields
setCaseJsonDataFieldsSet one or more fields of a typed case's structured json_data payload in one atomic write, leaving every other field as stored. Prefer this over PATCH /cases/{case_id} with a full json_data object when changing some fields: the write reads and locks the latest payload in the database, so a concurrent edit to another field, or to another item of the same array, is preserved. Each set entry names a path, a JSONPath declared in the queue's current Case schema, and the value to store there. A path is dotted object fields ($.invoice.amount) with optional array indices in brackets ($.lines[0] for a whole item, $.lines[0].amount for one field of it). An index must name an item that already exists; an out-of-range index or a non-array parent is refused, and a write never adds or removes items. A value can be any JSON value, including an object for an object field. Paths must be distinct, and no path may sit inside another in the same request ($.lines beside $.lines[0], or $.lines[0] beside $.lines[0].amount). An index names a position, so when the array can change between your read and your write, add expect entries that pin the item, such as its id field ($.lines[0].id): if any stored value differs, nothing is written and the response is a 409. The resulting payload is validated against the queue's current Case schema and the case is re-pinned to that schema version; if any entry is refused, nothing is written. A case without a structured payload yet must be given one with PATCH /cases/{case_id} first. Returns the updated case with its event history and approval batches.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| set | Yes | The fields to set, applied together (1 to 100). | |
| expect | No | Preconditions checked against the latest stored payload before any field is set (up to 100). If one does not match, nothing is written and the response is a 409. Use them to make sure an array index still names the item you read. | |
| case_id | Yes | The case's unique identifier |