Store
Creates a new object for the specified content type. The object is 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 stored. 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 create an
object for.
Example:
The available content types depend on the API configuration.
Request Body
The endpoint accepts a JSON object containing an optional layout identifier and an item with the field values to store.
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 field values for the new object. The fields depend on the content type and selected layout. |
Item
item
The item object contains the field values to be stored for the new object.
Each property in item corresponds to a field defined by the content type and
layout.
The item property names refer to the names of fields in the object. The
expected type of each value depends on the field.
Fields that are required are dependant on the layout and must be included in
the item.
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 assigned to the object. |
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. |
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 newly created object.
Content-Type: application/json
Example Response
The response contains only the id of the stored 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 newly created object. |
Complete Example
The following example stores a new object using layout 1 with the product
details shown below.
Request
curl -X POST "https://api.example.com/{contentType}/store" \
-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 store an object for, such asproducts, if supported by the API.YOUR_TOKEN— A valid bearer authentication token.
Response
Notes
- Content type determines the endpoint. Replace
{contentType}with the specific content type you want to create an object for. - Layout determines the accepted fields. The fields supplied in
itemshould match those defined by the specifiedlayout. - System fields are generated server side. Fields such as
id,created_at,updated_at,deleted_at,author_id, andgroup_idare set automatically and should not be sent in the request. - Only the identifier is returned. The response contains the
idof the new 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.