Working with data
Partial updates (PATCH)
PATCH updates only the fields you send. It is allowlist-based, treats null as ‘leave unchanged’, and never errors on a no-op.
Route shape
PATCH targets a single item by id:
curl -s -X PATCH "https://api.readycms.io/products/123/?namespace=<tenant>&lang=en" \
-H "Authorization: Bearer <app_id>:<app_secret>" \
-H "Content-Type: application/json" \
-d '{ "title": "Updated title" }'
lang is required only when the target table is language-scoped. Moderation resources such as comments and reviews omit it.
Semantics
- Allowlist-only. Each resource defines which columns can be updated; unknown fields are rejected.
nullmeans "not sent". A JSONnullleaves the field unchanged - it does not clear it.- No-op is success. If nothing would change, the response includes
noop: trueand still succeeds. updatedis bumped. Any non-noop PATCH updates the record's timestamp.- URLs regenerate. Changing slug-driving fields regenerates
slug/permalink/url.
Watch out
Because
null is treated as ‘leave unchanged’, you cannot clear a field by sending null. Send an empty string or the field's documented empty value instead, where the endpoint allows it.Where PATCH is available
PATCH is supported on products, manufacturers, custom content items, custom tags and categories, comments, reviews, discounts, menus, and translations. See each resource in the reference for its exact allowlist.