Appearance
Update
Updates use JSON Patch (RFC 6902) format: an array of patch operations applied to the existing entity.
Update a Single Record
http
PATCH /api/{entity}/{id}
Content-Type: application/json-patch+jsonThe request body is a JSON Patch array:
http
PATCH /api/product/AB-001
Content-Type: application/json-patch+json
[
{ "op": "replace", "path": "/price", "value": 179.99 },
{ "op": "replace", "path": "/status", "value": "LOW_STOCK" }
]Only the specified fields are modified. All other fields remain unchanged.
Response (200 OK) — the updated entity:
json
{
"reference": "AB-001",
"name": "Headphones",
"price": 179.99,
"category": { "id": 1, "name": "Electronics" },
"status": "LOW_STOCK"
}Supported JSON Patch Operations
| Operation | Description |
|---|---|
replace | Set a field to a new value |
add | Add a value (useful for arrays) |
remove | Remove/null a field |
copy | Copy value from one path to another |
move | Move value from one path to another |
test | Verify a field has a specific value (fails the patch if not) |
Bulk Update
Update multiple records in a single request.
http
PATCH /api/{entity}
Content-Type: application/json-patch+jsonThe request body is a BulkPatch object:
json
{
"ids": ["AB-001", "AB-002", "AB-003"],
"globalPatch": [
{ "op": "replace", "path": "/status", "value": "OUT_OF_STOCK" }
],
"specificPatches": {
"AB-001": [
{ "op": "replace", "path": "/price", "value": 149.99 }
]
}
}| Field | Required | Description |
|---|---|---|
ids | Yes | List of record IDs to update |
globalPatch | No | JSON Patch applied to all records in ids |
specificPatches | No | Map of id → JSON Patch applied to individual records. Applied before globalPatch. |
When both globalPatch and a specific patch exist for a record, the specific patch is applied first, then the global patch.
Response (200 OK) — list of all updated entities:
json
[
{ "reference": "AB-001", "price": 149.99, "status": "OUT_OF_STOCK", ... },
{ "reference": "AB-002", "status": "OUT_OF_STOCK", ... },
{ "reference": "AB-003", "status": "OUT_OF_STOCK", ... }
]Field-Level Bulk Update Control
Use @SquizyField(bulkUpdatable = false) to prevent a field from being changed in bulk updates:
java
@SquizyField(bulkUpdatable = false)
private String reference;See Bulk Operations for more details on field-level configuration.
Access Control
Requires the update authority for the entity. See RBAC.