Update
Updates an existing object for the specified content type. The object is
identified by its id in the route, and the values to apply are defined by
the fields supplied in the item property of the request body.
The endpoint accepts a layout identifier and an item containing the field values to be updated.
Partial updates are supported, so only the fields you want to change need to be included, but every field marked as required on the specified layout must be present.
System fields are generated and stored server side, so they do not need to be included in the request.
Because the structure of each item depends on the selected content type, the
fields within item may vary between requests.
Endpoint
Replace {contentType} with route of the content type you want to update an
object for, and {id} with the identifier of the object to update.
Example:
The available content types depend on the API configuration.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
contentType |
string | Yes | The route of the content type the object belongs to. |
id |
integer | Yes | The unique identifier of the object to update. |
Request Body
The endpoint accepts a JSON object containing a layout identifier and an item with the field values to update.
Example Request
{
"layout": 1,
"item": {
"name": "Wireless Headphones",
"category": 1,
"price": 79.99,
"brand": "SoundWave",
"stock": 45,
"rating": 4.5,
"sku": "SW-001"
}
}
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
layout |
integer | Yes | The ID of the layout that determines which fields are accepted for the item. |
item |
object | Yes | An object containing the updated field values for the object. Only the fields to change need to be included, but all fields required by the layout must be present. The fields depend on the content type and selected layout. |
Item
item
The item object contains the field values to be stored for the existing
object. Each property in item corresponds to a field defined by the content
type and layout.
Partial updates are supported. Fields that are omitted from item are left
unchanged. However, all fields that are required on the specified layout must
be included in the request, even if their values are not changing.
The item property names refer to the names of fields in the object. The
expected type of each value depends on the field.
Example Item Fields
The following table describes the fields used in the example request. The fields available for your content type may differ.
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | Yes | The name of the product. |
category |
integer | Yes | The identifier of the category the product belongs to. |
price |
number | Yes | The price of the product. |
brand |
string | No | The brand of the product. |
stock |
integer | No | The quantity of the product currently in stock. |
rating |
number | No | The rating of the product. |
sku |
string | No | The stock keeping unit (SKU) used to identify the product. |
Note: The fields, types, and required status shown above are illustrative and are determined by the relevant content type and layout configuration.
System Fields
System fields are generated and stored server side. Do not include them in
the item object.
| Field | Type | Description |
|---|---|---|
id |
integer | The unique identifier of the object. This is set by the {id} path parameter and cannot be changed. |
created_at |
string | The date and time when the object was created. |
updated_at |
string | The date and time when the object was last updated. This is refreshed automatically when the object is updated. |
deleted_at |
string or null |
The date and time when the object was deleted, or null if the object has not been deleted. |
author_id |
integer | The identifier of the author who created the object. |
group_id |
integer | The identifier of the group to which the object belongs. |
Response
A successful request returns a JSON response containing the identifier of the updated object.
Content-Type: application/json
Example Response
The response contains only the id of the updated object. To retrieve the full
object, including its system fields, use the View endpoint.
Response Fields
Top-Level Fields
| Field | Type | Description |
|---|---|---|
id |
integer | The unique identifier of the updated object. |
Complete Example
The following example updates the object with ID 1 using layout 1 with
the product details shown below.
Request
curl -X POST "https://api.example.com/{contentType}/{id}" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"layout": 1,
"item": {
"name": "Wireless Headphones",
"category": 1,
"price": 79.99,
"brand": "SoundWave",
"stock": 45,
"rating": 4.5,
"sku": "SW-001"
}
}'
Replace the following placeholders before sending the request:
{contentType}— The content type to update an object for, such asproducts, if supported by the API.{id}— The identifier of the object to update, such as1.YOUR_TOKEN— A valid bearer authentication token.
Response
Notes
- Content type and ID determine the endpoint. Replace
{contentType}with the content type and{id}with the identifier of the object you want to update. - Layout determines the accepted fields. The fields supplied in
itemshould match those defined by the specifiedlayout. - Partial updates are supported. Only the fields you include in
itemare changed; omitted fields keep their existing values. - Required fields must be present. All fields marked as required on the
specified
layoutmust be included initem, even when performing a partial update. - System fields are generated server side. Fields such as
id,created_at,updated_at,deleted_at,author_id, andgroup_idare managed automatically and should not be sent in the request. - Only the identifier is returned. The response contains the
idof the updated object, not the full object. - Request and response use JSON. Both the request and response use the
application/jsoncontent type. - Item fields may vary. Do not assume that all content types or layouts accept identical item structures.