Fetches the blocks associated with a collection. The response includes block containers and their associated blocks, ordered by the block’s position. Results can be paginated.
curl --request GET \
--url https://api.oneofnone.io/v1/collections/{id}/blocks \
--header 'x-api-key: <api-key>'{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"collection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"blocks": [
{
"block": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"title": "<string>",
"description": "<string>",
"status": "ACTIVE",
"target_size": "2x1",
"type": "text",
"action_type": "url",
"url": "<string>",
"visibility": "public",
"tags": [
"<string>"
],
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"team_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"style": {
"color": "<string>",
"font_size": "<string>",
"line_height": "<string>",
"background_color": "<string>",
"overlay_color": "<string>",
"padding_top": "<string>",
"padding_right": "<string>",
"padding_bottom": "<string>",
"padding_left": "<string>",
"border_width": "<string>",
"border_color": "<string>",
"border_radius": "<string>"
},
"card": {
"class_name": "<string>",
"header": {
"text": "<string>",
"element": "h2",
"color": "<string>",
"font_size": "<string>",
"line_height": "<string>",
"text_align": "left",
"uppercase": true,
"class_name": "<string>"
},
"footer": {
"text": "<string>",
"element": "h2",
"color": "<string>",
"font_size": "<string>",
"line_height": "<string>",
"text_align": "left",
"uppercase": true,
"class_name": "<string>"
},
"body": {
"class_name": "<string>",
"align_vertical": "top",
"align_horizontal": "left",
"content": "<string>"
}
},
"dialog": {
"class_name": "<string>",
"carousel_style": 1,
"carousel_cta": {
"text": "<string>",
"text_class_name": "<string>",
"button_label": "<string>",
"button_href": "<string>",
"button_class_name": "<string>",
"class_name": "<string>"
},
"caption": "<string>",
"youtube": true,
"post_title": "<string>",
"post_body": "<string>",
"post_date": "<string>",
"post_date_format": "<string>",
"iframe_url": "<string>"
},
"image": {
"alt": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"file_type": "<string>",
"id": 123,
"poster_url": "<string>",
"size": 123,
"tags": [
"<string>"
],
"thumbnail_url": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"url": "<string>"
},
"background_image": {
"alt": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"file_type": "<string>",
"id": 123,
"poster_url": "<string>",
"size": 123,
"tags": [
"<string>"
],
"thumbnail_url": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"url": "<string>"
},
"video": {
"alt": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"file_type": "<string>",
"id": 123,
"poster_url": "<string>",
"size": 123,
"tags": [
"<string>"
],
"thumbnail_url": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"url": "<string>"
},
"gallery": [
{
"alt": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"file_type": "<string>",
"id": 123,
"poster_url": "<string>",
"size": 123,
"tags": [
"<string>"
],
"thumbnail_url": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"url": "<string>",
"order": 123,
"variants": [
"<string>"
],
"type": "<string>",
"caption": "<string>"
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"order": 1
}
]
}
],
"pagination": {
"next": "https://api.example.com/users?limit=20&offset=20",
"prev": "https://api.example.com/users?limit=20&offset=0",
"limit": 20,
"offset": 0,
"total_count": 150,
"total_pages": 8,
"current_page": 1
}
}The API key required for accessing protected routes. It should be included in the request headers as x-api-key.
The unique identifier of the collection.
The maximum number of items to return (1-1000).
1 <= x <= 1000The number of items to skip before starting to collect the result set.
x >= 0The sort order of the results.
asc, desc The field by which to order the results.
If true, returns additional pagination metadata including total count and total pages.
Successfully retrieved collection blocks.
Show child attributes
Show child attributes
Show child attributes
The unique identifier for the block.
The URL-friendly slug for the block.
The title of the block.
The description of the block.
The current status of the block.
ACTIVE, DRAFT, ARCHIVED The target size dimensions for the block layout.
2x1, 1x1, 1x2 The type of content displayed in the block.
text, image, text-image, image-text, placeholder The type of action that occurs when the block is interacted with.
url, carousel, image, video, post, iframe, registration The URL associated with the block action.
The visibility level of the block.
public, collection, owner Tags associated with the block for categorization.
The unique identifier of the block owner.
The unique identifier of the team that owns the block.
Custom styling configuration for the block.
Show child attributes
Default text color for the block (applies to body, header, footer).
Default font size for the block (applies to body, header, footer).
Default line height for the block (applies to body, header, footer).
Background color for the block.
Overlay color for the block.
Padding top for the block.
Padding right for the block.
Padding bottom for the block.
Padding left for the block.
Border width for the block.
Border color for the block.
Border radius for the block.
Card layout and content configuration for the block.
Show child attributes
CSS class name for the card container.
Header configuration for the card.
Show child attributes
Heading text.
Heading element type (default h4).
h2, h3, h4, h5, h6, div Heading color. Defaults to the foreground variable.
Heading font size.
Heading line height.
Heading text alignment.
left, center, right Whether the heading text should be uppercase.
Custom class name selector for the heading element.
Footer configuration for the card.
Show child attributes
Heading text.
Heading element type (default h4).
h2, h3, h4, h5, h6, div Heading color. Defaults to the foreground variable.
Heading font size.
Heading line height.
Heading text alignment.
left, center, right Whether the heading text should be uppercase.
Custom class name selector for the heading element.
Show child attributes
CSS class name for the card body.
Vertical alignment of the card body content.
top, center, bottom Horizontal alignment of the card body content.
left, center, right The main content text for the card body.
Dialog configuration for interactive block behaviors.
Show child attributes
CSS class name for the dialog container.
Style variation for carousel dialog type.
1, 2 Call-to-action configuration for carousel dialogs.
Show child attributes
Call-to-action text.
CSS class for the CTA text.
Label for the CTA button.
URL for the CTA button.
CSS class for the CTA button.
CSS class for the CTA container.
Caption text for image dialogs.
Whether the video is from YouTube for video dialogs.
Title for post dialogs.
Body content for post dialogs.
Date string for post dialogs.
Date format specification for post dialogs.
URL for iframe dialogs.
The primary image media for the block. Note that id, url, alt, style, and file_type fields are populated in block responses.
Show child attributes
Alternative text for the media.
The creation timestamp of the media.
Description of the media.
The file type of the media.
The unique identifier for the media.
URL to the poster of the media.
The size of the media in bytes.
Tags associated with the media.
URL to the thumbnail of the media.
The last updated timestamp of the media.
URL to the media.
The background image media for the block. Note that id, url, alt, style, and file_type fields are populated in block responses.
Show child attributes
Alternative text for the media.
The creation timestamp of the media.
Description of the media.
The file type of the media.
The unique identifier for the media.
URL to the poster of the media.
The size of the media in bytes.
Tags associated with the media.
URL to the thumbnail of the media.
The last updated timestamp of the media.
URL to the media.
The video media for the block. Note that only url, poster_url, and file_type fields are populated in block responses.
Show child attributes
Alternative text for the media.
The creation timestamp of the media.
Description of the media.
The file type of the media.
The unique identifier for the media.
URL to the poster of the media.
The size of the media in bytes.
Tags associated with the media.
URL to the thumbnail of the media.
The last updated timestamp of the media.
URL to the media.
The gallery items related to the block. Note that only id, url, file_type, poster_url, and order fields are populated in block responses.
Show child attributes
Alternative text for the media.
The creation timestamp of the media.
Description of the media.
The file type of the media.
The unique identifier for the media.
URL to the poster of the media.
The size of the media in bytes.
Tags associated with the media. Variants of the gallery item.
URL to the thumbnail of the media.
The last updated timestamp of the media.
URL to the media.
Order of the gallery item.
Variants of the gallery item.
Type of the gallery item.
Caption of the gallery item.
The timestamp when the block was created.
The timestamp when the block was last updated.
x >= 0Show child attributes
URL for the next page of results, null if this is the last page
"https://api.example.com/users?limit=20&offset=20"
URL for the previous page of results, null if this is the first page
"https://api.example.com/users?limit=20&offset=0"
The maximum number of items returned per page
1 <= x <= 100020
The number of items skipped before the current page
x >= 00
Total number of items available (only included when count is requested)
x >= 0150
Total number of pages available (only included when count is requested)
x >= 08
Current page number (only included when count is requested)
x >= 11
curl --request GET \
--url https://api.oneofnone.io/v1/collections/{id}/blocks \
--header 'x-api-key: <api-key>'{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"collection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"blocks": [
{
"block": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"title": "<string>",
"description": "<string>",
"status": "ACTIVE",
"target_size": "2x1",
"type": "text",
"action_type": "url",
"url": "<string>",
"visibility": "public",
"tags": [
"<string>"
],
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"team_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"style": {
"color": "<string>",
"font_size": "<string>",
"line_height": "<string>",
"background_color": "<string>",
"overlay_color": "<string>",
"padding_top": "<string>",
"padding_right": "<string>",
"padding_bottom": "<string>",
"padding_left": "<string>",
"border_width": "<string>",
"border_color": "<string>",
"border_radius": "<string>"
},
"card": {
"class_name": "<string>",
"header": {
"text": "<string>",
"element": "h2",
"color": "<string>",
"font_size": "<string>",
"line_height": "<string>",
"text_align": "left",
"uppercase": true,
"class_name": "<string>"
},
"footer": {
"text": "<string>",
"element": "h2",
"color": "<string>",
"font_size": "<string>",
"line_height": "<string>",
"text_align": "left",
"uppercase": true,
"class_name": "<string>"
},
"body": {
"class_name": "<string>",
"align_vertical": "top",
"align_horizontal": "left",
"content": "<string>"
}
},
"dialog": {
"class_name": "<string>",
"carousel_style": 1,
"carousel_cta": {
"text": "<string>",
"text_class_name": "<string>",
"button_label": "<string>",
"button_href": "<string>",
"button_class_name": "<string>",
"class_name": "<string>"
},
"caption": "<string>",
"youtube": true,
"post_title": "<string>",
"post_body": "<string>",
"post_date": "<string>",
"post_date_format": "<string>",
"iframe_url": "<string>"
},
"image": {
"alt": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"file_type": "<string>",
"id": 123,
"poster_url": "<string>",
"size": 123,
"tags": [
"<string>"
],
"thumbnail_url": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"url": "<string>"
},
"background_image": {
"alt": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"file_type": "<string>",
"id": 123,
"poster_url": "<string>",
"size": 123,
"tags": [
"<string>"
],
"thumbnail_url": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"url": "<string>"
},
"video": {
"alt": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"file_type": "<string>",
"id": 123,
"poster_url": "<string>",
"size": 123,
"tags": [
"<string>"
],
"thumbnail_url": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"url": "<string>"
},
"gallery": [
{
"alt": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"file_type": "<string>",
"id": 123,
"poster_url": "<string>",
"size": 123,
"tags": [
"<string>"
],
"thumbnail_url": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"url": "<string>",
"order": 123,
"variants": [
"<string>"
],
"type": "<string>",
"caption": "<string>"
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"order": 1
}
]
}
],
"pagination": {
"next": "https://api.example.com/users?limit=20&offset=20",
"prev": "https://api.example.com/users?limit=20&offset=0",
"limit": 20,
"offset": 0,
"total_count": 150,
"total_pages": 8,
"current_page": 1
}
}