Get Collection Item
Get a single item from a collection.
Request
GET https://app.ycode.com/api/v1/collections/{collection_id}/items/{item_id}Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
collection_id | string | Yes | Unique identifier for the collection |
item_id | string | Yes | Unique identifier for the collection item |
Headers
| Header | Value |
|---|---|
| Authorization | Bearer YOUR_API_TOKEN |
Response
Returns a single item object wrapped in a data key. The item includes all fields defined in the collection, along with system fields.
System fields
| Field | Type | Description |
|---|---|---|
_ycode_id | string | Unique identifier for the item |
ID | integer | Auto-incrementing numeric ID |
Slug | string | URL-friendly slug |
Created date | string | ISO 8601 creation timestamp |
Updated date | string | ISO 8601 last update timestamp |
Created by | string | ID of the user who created the item |
Updated by | string | ID of the user who last updated the item |
Example response
{
"data": {
"_ycode_id": "16687860798456377a79fce481",
"ID": 1,
"Name": "Blogpost title",
"Slug": "blogpost-title",
"Created date": "2022-11-18T15:41:19.000Z",
"Updated date": "2022-11-18T15:42:03.000Z",
"Created by": "1669309481596637fa4299184e",
"Updated by": "1669309527456637fa4576f6dc",
"Summary": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
"Main Image": "https://storage.googleapis.com/ycode-prod-uploads/...",
"Thumbnail Image": "https://storage.googleapis.com/ycode-prod-uploads/...",
"Featured": 1,
"Author": "16687859744696377a736727d8",
"Categories": [
"1669309639520637fa4c77eea7",
"1669309662211637fa4de338d6"
],
"Body": "<p>Lorem ipsum dolor sit amet...</p>"
}
}Example request
curl https://app.ycode.com/api/v1/collections/637781341a6f7/items/16687860798456377a79fce481 \
-H "Authorization: Bearer YOUR_API_TOKEN"Last updated on