Skip to Content
DocsItemsGet Item

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

ParameterTypeRequiredDescription
collection_idstringYesUnique identifier for the collection
item_idstringYesUnique identifier for the collection item

Headers

HeaderValue
AuthorizationBearer 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

FieldTypeDescription
_ycode_idstringUnique identifier for the item
IDintegerAuto-incrementing numeric ID
SlugstringURL-friendly slug
Created datestringISO 8601 creation timestamp
Updated datestringISO 8601 last update timestamp
Created bystringID of the user who created the item
Updated bystringID 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