Appearance
Item
Single contribution (content entry) operations.
Routes
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | /api/item/:id | Bearer | Get single contribution |
| POST | /api/item/:id | JWT | Update a contribution |
| PATCH | /api/item/:id | JWT | Partially update a contribution |
| PUT | /api/item/:chapter? | JWT | Create a new contribution |
| DELETE | /api/item/:id | JWT | Delete a contribution |
/api/collection/:any/:id is an alias for /api/item/:id (GET, POST, PATCH, DELETE).
All write routes accept either application/json or multipart/form-data. Use multipart whenever binaries are sent to a Bild field — see File Uploads.
Get Single Item
GET /api/item/:id?query=<JSON>The query parameter supports:
| Parameter | Type | Default | Description |
|---|---|---|---|
where | object | — | Must contain id |
depth | number | 1 | Levels of references resolved in relation fields (0–3) |
schema | boolean | false | Return JSON Schema |
type | string | — | Set to "ts" to return TypeScript types instead of JSON Schema (requires schema: true) |
meta | boolean | false | Metadata only |
referenced | boolean/object | false | Include the referencing contributions: true or {depth, limit}, see Referenced |
limit | number | 1000 | Only limits referenced (unless referenced.limit is set) |
fields | array | all | Field selection |
Example
bash
curl http://localhost:8080/api/item/42 \
-H "Authorization: Bearer API_KEY"bash
# With depth and field selection
curl -G http://localhost:8080/api/item/42 \
-H "Authorization: Bearer API_KEY" \
--data-urlencode 'query={"where":{"id":42},"depth":2,"fields":["Title","Body"]}'bash
# The first 20 contributions referencing item 42, with their fields
curl -G http://localhost:8080/api/item/42 \
-H "Authorization: Bearer API_KEY" \
--data-urlencode 'query={"referenced":{"depth":1,"limit":20}}'The response contains id, name, sort (number or null) and fields. With meta: true, created, lastmodified, status, config, book, chapter, issue and template are added. With referenced, referenced and referencedCount are added (see Referenced).
fields are ordered like the template definition (field sort, then field id). Relation fields (TypologySelect) list their items in the order they were stored; referenced entries are ordered by the referencing contribution, then by field.
Create Item (PUT)
PUT /api/item/:chapter?Creates a contribution with one data row per template field. The chapter comes from the URL or from chapter in the body. Fields not present in fields are created empty.
Response: {"status": "ok", "id": 123, "name": "..."}
Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Display name |
sort | number | No | Sort order |
status | enum: Close, Draft, Open, Deleted, close, draft, open, deleted | No | Status value |
created | number | No | Creation timestamp (unix) |
lastmodified | number | No | Last modified timestamp (unix) |
config | object | No | Configuration object |
chapter | object | number | string |
book | object | number | string |
issue | object | number | string |
template | object | number | string |
fields | object | No | Field values (keyed by field name) |
Example
bash
curl -X PUT http://localhost:8080/api/item/1 \
-H "Authorization: Bearer JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "New Entry", "template": "Article", "fields": {"Title": "Hello"}}'bash
# With an image upload
curl -X PUT http://localhost:8080/api/item/1 \
-H "Authorization: Bearer JWT_TOKEN" \
-F 'payload={"name": "New Entry", "fields": {"Title": "Hello", "Image": [{"key": "photo.jpg", "action": "upload", "captions": ["A caption"]}]}}' \
-F "files=@./photo.jpg"Update Item (POST)
POST /api/item/:idComplete update: fields must contain every field of the template, otherwise the request is rejected. For Bild fields, assets not mentioned in the field value are kept (see File Uploads).
Response: {"status": "ok", "id": 42, "name": "...", "payload": {<updated fields>}} — payload contains the serialized value of every field that was written, including the final asset URLs of uploads.
Body
| Field | Type | Required | Description |
|---|---|---|---|
id | number | No | Entity ID |
sort | number | No | Sort order |
name | string | Yes | Display name |
created | number | No | Creation timestamp (unix) |
lastmodified | number | No | Last modified timestamp (unix) |
status | enum: Close, Draft, Open, Deleted, close, draft, open, deleted | Yes | Status value |
config | object | Yes | Configuration object |
chapter | number | string | Yes |
issue | number | string | No |
template | number | string | Yes |
fields | object | Yes | Field values (keyed by field name) |
Example
bash
curl -X POST http://localhost:8080/api/item/42 \
-H "Authorization: Bearer JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "Updated Title", "fields": {"Title": "New Title"}, "status": "Open"}'Partial Update (PATCH)
PATCH /api/item/:idOnly the fields present in fields are touched. Same response shape as POST.
Body
| Field | Type | Required | Description |
|---|---|---|---|
id | number | No | Entity ID |
name | string | No | Display name |
sort | number | No | Sort order |
status | enum: Close, Draft, Open, Deleted, close, draft, open, deleted | No | Status value |
config | object | No | Configuration object |
chapter | number | string | No |
issue | number | string | No |
template | number | string | No |
fields | object | No | Field values (keyed by field name) |
Example
bash
# Upload a new image, rename the caption of an existing one, delete another
curl -X PATCH http://localhost:8080/api/item/42 \
-H "Authorization: Bearer JWT_TOKEN" \
-F 'payload={"fields": {"Image": [
{"key": "new.jpg", "action": "upload", "captions": ["New"]},
{"key": "existing.jpg", "action": "rename", "captions": ["Updated caption"]},
{"key": "obsolete.jpg", "action": "delete"}
]}}' \
-F "files=@./new.jpg"Delete Item
DELETE /api/item/:idDeletes the contribution and all its field data. Runs field-type delete hooks (e.g., S3 file cleanup).
Response: {"status": "ok", "affected_items": 1}