Skip to content

Slots and References ​

The CMS API supports powerful schema composition through slots and references ($ref). These features allow you to build complex, reusable, and nested content structures by combining multiple schemas.

Table of Contents ​

Slots ​

Slots allow you to define placeholder areas in a component where other content can be dynamically inserted. This enables flexible, composable content structures.

Defining a Slot ​

Slots are defined using a $ref with a special slot URL pattern:

json
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "items": {
      "$ref": "http://access.flatnode.net/slot/items#"
    }
  }
}

The slot name (items in this example) can be any identifier you choose.

Creating Content with Slots ​

When creating content, slots are optional. You can create content without providing slot data:

json
{
  "DocumentId": "550e8400-e29b-41d4-a716-446655440000",
  "ComponentId": "660e8400-e29b-41d4-a716-446655440001",
  "position": "first",
  "data": {
    "name": "Test User"
    // Note: 'items' slot is not provided - this is valid
  }
}

Adding Content to Slots ​

To add content to a slot, create a separate content instance with a parent parameter:

json
{
  "DocumentId": "550e8400-e29b-41d4-a716-446655440000",
  "ComponentId": "770e8400-e29b-41d4-a716-446655440002",
  "parent": {
    "HostContentId": "660e8400-e29b-41d4-a716-446655440001",
    "Slot": "items"
  },
  "position": "first",
  "data": {
    "title": "Slot Item Title",
    "description": "Slot Item Description"
  }
}

Parameters:

  • HostContentId - The _uuid of the content instance that contains the slot (e.g. data._uuid from the response in Step 2 below), not its _component uuid - that one names the component SCHEMA, not this instance. It can also be the _uuid of one specific slot instance of an array-of-slots field, in which case Slot is omitted.
  • Slot - The name of the slot (must match the $ref in the component schema)
  • position - Where to insert the content: "first" or "last". Slot items render in true insertion order (not simply array-append order if you mix "first"/"last" across multiple inserts - position affects nested-set placement exactly as it sounds like it should).

Visibility: every slot item needs its own promote ​

A slot item is a full component instance with its own independent draft/approve/promote lifecycle, exactly like a document's root content - adding it to a slot does not inherit the host's status. A freshly added slot item sits in draft and will not appear in a GET response for any non-internal token (i.e. anything but the CMS's own editor) until you POST /content/{uuid}/promote it individually - see Content Versions. Promoting the host's own content does not promote its slot children.

Example: Simple Slot ​

Step 1: Create Component with Slot

bash
curl -X POST "https://admin.flatnode.net/api/v1/component" \
  -H "Authorization: Bearer your-token-here" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Example object with Slot Ref",
    "type": "object",
    "properties": {
      "name": {
        "type": "string",
        "description": "This is the full name of the user"
      },
      "items": {
        "$ref": "http://access.flatnode.net/slot/items#"
      }
    }
  }'

Step 2: Create Host Content (without slot data)

bash
curl -X POST "https://admin.flatnode.net/api/v1/content" \
  -H "Authorization: Bearer your-token-here" \
  -H "Content-Type: application/json" \
  -d '{
    "DocumentId": "550e8400-e29b-41d4-a716-446655440000",
    "ComponentId": "660e8400-e29b-41d4-a716-446655440001",
    "position": "first",
    "data": {
      "name": "Test User"
    }
  }'

Response: 201 Created, with data._uuid - this is the uuid Step 4 below needs as HostContentId.

Step 3: Create Slot Component

bash
curl -X POST "https://admin.flatnode.net/api/v1/component" \
  -H "Authorization: Bearer your-token-here" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Slot Content Component",
    "type": "object",
    "properties": {
      "title": {
        "type": "string"
      },
      "description": {
        "type": "string"
      }
    }
  }'

Step 4: Add Content to Slot

bash
curl -X POST "https://admin.flatnode.net/api/v1/content" \
  -H "Authorization: Bearer your-token-here" \
  -H "Content-Type: application/json" \
  -d '{
    "DocumentId": "550e8400-e29b-41d4-a716-446655440000",
    "ComponentId": "770e8400-e29b-41d4-a716-446655440002",
    "parent": {
      "HostContentId": "660e8400-e29b-41d4-a716-446655440001",
      "Slot": "items"
    },
    "position": "first",
    "data": {
      "title": "Slot Item Title",
      "description": "Slot Item Description"
    }
  }'

Remember to POST /content/{uuid}/promote the item created here before expecting it to show up in a GET from anything but the CMS's own editor - see Visibility above.

References ​

References ($ref) allow you to reuse and compose schemas in multiple ways. The API supports several types of references.

Three reference documents are built in. Each one points at a single row and resolves to the same field the inline format form below builds:

$refPoints atInline equivalent
http://access.flatnode.net/file-reference.schema.json#a file{"type": "object", "format": "file"}
http://access.flatnode.net/image-reference.schema.json#a file, edited as an image{"type": "object", "format": "image"}
http://access.flatnode.net/link-reference.schema.json#a document, or an external URL{"type": "object", "format": "link"}

The two spellings are interchangeable - the reference document carries the format itself - so pick whichever reads better. The admin UI's schema builder writes the inline form, and leaves a $ref you authored as a $ref.

file and image point at the same kind of row and differ only in how they are edited and whether they can hold a crop - Images versus files in a component schema covers which to pick.

json
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "image": {
      "$ref": "http://access.flatnode.net/image-reference.schema.json#"
    }
  }
}

When creating content, provide the file's uuid:

json
{
  "name": "Lilalaunebär",
  "image": {
    "id": "550e8400-e29b-41d4-a716-446655440000"
  }
}

A file or image reference may also name a variant - a crop of that file - with variant_id. Pass null for the original:

json
{
  "image": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "variant_id": "660e8400-e29b-41d4-a716-446655440001"
  }
}

Reading the field back returns the same shape plus the file's denormalized title and caption. id and variant_id are always uuids; internal row ids never cross the API boundary.

A link field reads back as the target document's id, title, its url - the path from the project root, telescopes/the-aurora-array, kept current when a page is renamed or moved - the authored text, and published:

json
{ "id": "550e8400-…", "title": "The Aurora Array", "url": "telescopes/the-aurora-array",
  "text": "The Aurora Array", "published": true }

published is resolved on every read, because the target's state changes without the link being touched: false while the page it names has no live root version, so a renderer can drop the href rather than ship a dead link, and null for an external URL, which has no page to ask. The pick itself stays - an editor still sees which page is linked - which is why a link to an unpublished page is a flag rather than null, unlike a library entry pick whose value is the entry's content.

url is the target's path and is kept current when the page is re-slugged or moved. A link to the project root reads url: "" - the root's path is empty - so "" with published: true is home, and null with published: false is a page that has since been deleted.

A link's text and url hold up to 255 characters each. A longer one is refused with a 422 naming the field, the way a Text value is, before anything is written.

Component References (UUID) ​

Reference another component by its UUID:

json
{
  "$schema": "http://access.flatnode.net/component.schema.json",
  "title": "refref",
  "type": "object",
  "properties": {
    "myitem": {
      "$ref": "http://access.flatnode.net/uuid/550e8400-e29b-41d4-a716-446655440000"
    }
  }
}

Example Workflow:

  1. Create first component and get its UUID
  2. Create second component that references the first
  3. Create content using the nested structure
bash
# Step 1: Create base component
curl -X POST "https://admin.flatnode.net/api/v1/component" \
  -H "Authorization: Bearer your-token-here" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Base Component",
    "type": "object",
    "properties": {
      "name": {"type": "string"},
      "image": {"$ref": "http://access.flatnode.net/file-reference.schema.json#"}
    }
  }'

# Response: {"data": {"_uuid": "660e8400-e29b-41d4-a716-446655440001", "...": "..."}}

# Step 2: Create component that references the base
curl -X POST "https://admin.flatnode.net/api/v1/component" \
  -H "Authorization: Bearer your-token-here" \
  -H "Content-Type: application/json" \
  -d '{
    "$schema": "http://access.flatnode.net/component.schema.json",
    "title": "Container Component",
    "type": "object",
    "properties": {
      "myitem": {
        "$ref": "http://access.flatnode.net/uuid/550e8400-e29b-41d4-a716-446655440000"
      }
    }
  }'

# Step 3: Create content with nested structure
curl -X POST "https://admin.flatnode.net/api/v1/content" \
  -H "Authorization: Bearer your-token-here" \
  -H "Content-Type: application/json" \
  -d '{
    "DocumentId": "550e8400-e29b-41d4-a716-446655440000",
    "ComponentId": "770e8400-e29b-41d4-a716-446655440002",
    "position": "first",
    "data": {
      "myitem": {
        "name": "Mein Test",
        "image": {"id": "880e8400-e29b-41d4-a716-446655440003"}
      }
    }
  }'

Library References ​

Reference a Library to turn a field into a live query over its entries - a teaser that always shows the latest five press releases in a category, say:

json
{
  "type": "object",
  "title": "Press Release Teaser",
  "properties": {
    "heading": { "type": "string" },
    "releases": {
      "$ref": "http://access.flatnode.net/library/0f8fad5b-d9cb-469f-a165-70867728950e#"
    }
  }
}

The segment after /library/ is the Library's _uuid. You may write the Library's slug there instead when authoring by hand; it is resolved to the uuid when the component is saved, so the stored schema always names the library by uuid, and renaming the library, or deleting it and creating another under the same title, never moves what the field points at. A slug that names no library in the project is kept as written and refused when content is first written against the field.

The schema binds the field to a library; the query is authored per placement, in the content itself - so one Teaser component serves every page, each with a different filter:

json
{
  "heading": "Latest from the newsroom",
  "releases": {
    "filter": { "category": { "eq": "product" } },
    "sort": "-publishDate",
    "limit": 5,
    "fields": ["headline", "publishDate"]
  }
}

filter, sort and limit are exactly the grammar List/Filter Entries documents, and are validated against the library's declared filterable fields when the content is saved - a query that can't be answered is rejected with 422 then, rather than quietly returning nothing later.

The $ref shorthand cannot carry configuration. Keywords written beside a $ref are dropped, so {"$ref": ".../library/x#", "limit": 3} loses the limit. To pin anything at schema level, write the field inline instead:

json
{
  "releases": {
    "type": "object",
    "format": "libraryQuery",
    "library": "0f8fad5b-d9cb-469f-a165-70867728950e"
  }
}

What a read returns ​

The query runs on every read, so the field resolves to entries rather than to what was stored:

json
{
  "heading": "Latest from the newsroom",
  "releases": [
    {
      "_uuid": "220e8400-e29b-41d4-a716-44665544000c",
      "_type": "component",
      "_component": "1f1d6a5c-7b89-6688-9f14-82c6870734f1",
      "_value": { "headline": "Acme Robotics Unveils...", "publishDate": "2026-01-15" }
    }
  ]
}

Each entry arrives in the same envelope a slot child does, so _component works unchanged with every /content/{uuid} endpoint.

  • Only live entries appear. An entry that isn't currently promoted (and inside its reveal/conceal window) is absent - including for the CMS's own editor, which deliberately does not get the draft-visibility fallback it gets elsewhere. A teaser shows what the public sees.
  • The list follows the library, not the page. Promoting or withdrawing an entry changes what this field returns without the containing content being touched at all. Anything caching a page by its content version has to account for that.
  • Nesting is capped. If a library's own entries carry library-query fields, resolution stops after 3 levels, so a schema that refers back to itself terminates instead of recursing forever.
  • Breadth is capped too. A render resolves at most 500 library entries in total, however they are spread across picks, library queries and nesting levels. Past that, further entries resolve as null and the response carries "_truncated": true at the top level
    • the key is absent on any response that resolved everything, so it never has to be read to be trusted. null rather than a partial entry because it is already what a pick whose entry was withdrawn or deleted renders as. A page hitting this is almost always a schema fanning out wider than intended rather than a real editorial need.
  • Editing reads the query, not the result. A request rendering with configuration (the CMS's own editor, i.e. an internal token - see Documents) gets the stored query back instead of the entries, because that's the thing it can edit and put back. Every other reader gets the resolved entries.

Trimming the response with fields ​

fields lists which top-level properties of an entry to return; omit it and whole entries come back. It names properties of the entry's component schema, which is a wider set than filter/sort can use - projecting a richtext body or an image is fine even though neither can be filtered on.

Selection is top-level only, and naming an object or array returns it whole. It trims the response rather than fetching less: entries are read in full and the unwanted keys dropped afterwards, so this saves payload, not work on the server.

Single Library Entry References ​

Where a library query says "whichever entries match this", a single entry reference says "this one" - an article naming its author, a product naming its manufacturer. Exactly one entry, picked by an editor:

json
{
  "type": "object",
  "title": "Article",
  "properties": {
    "headline": { "type": "string" },
    "author": {
      "$ref": "http://access.flatnode.net/library-entry/1e8f7c2a-3b4d-6e5f-8a9b-0c1d2e3f4a5b#"
    }
  }
}

The segment after /library-entry/ is the Library's _uuid, exactly as for a query, and a slug written there is resolved to the uuid on save the same way - and the two are separate ref families on purpose, because keywords written beside a $ref are dropped, so there is nowhere to put a "just one" modifier. The inline spelling is available for the same reason it is for a query:

json
{
  "author": {
    "type": "object",
    "format": "libraryEntry",
    "library": "1e8f7c2a-3b4d-6e5f-8a9b-0c1d2e3f4a5b"
  }
}

Cardinality comes from JSON Schema itself: list the field in required to make the pick mandatory, leave it out to allow none, and wrap it in an array ({"type": "array", "items": {"$ref": ".../library-entry/<uuid>#"}}, with the inline spelling for items) for several.

What a write takes ​

json
{
  "headline": "Acme Robotics Unveils...",
  "author": { "id": "1f1dc4a0-2f3e-6b10-9f14-82c6870734f1" }
}

The same {"id": "<uuid>"} shape every reference to one thing takes. The uuid is the entry's _entry - its stable identity, shared by every version of it (see below). A rendered entry's _uuid, which belongs to whichever version is currently live, is accepted too and normalized to the same thing, so a client holding a listing can pass what it has.

A uuid that names nothing, or names an entry of a different library than the schema binds this field to, is rejected with 422 before anything is written.

To clear a pick, send the reference with no id - {"author": {"id": null}}. A bare null will not do it: a null value means "this field was not in the request" everywhere in this API, so it is skipped rather than applied. The field then keeps its binding to the library and simply has nothing picked. (link/file/image have no equivalent - they can be repointed but not emptied.)

What a read returns ​

The pick is stored; what the entry currently says is not. Every read resolves the reference to whichever version of that entry is live now, in the same envelope a slot child arrives in:

json
{
  "headline": "Acme Robotics Unveils...",
  "author": {
    "_uuid": "220e8400-e29b-41d4-a716-44665544000c",
    "_entry": "1f1dc4a0-2f3e-6b10-9f14-82c6870734f1",
    "_type": "component",
    "_component": "1f1d6a5c-7b89-6688-9f14-82c6870734f1",
    "_value": { "name": "Jane Doe", "bio": "Reporter" }
  }
}
  • _entry is the stable identity, _uuid is the live version's. Every version of an entry shares one _entry; _uuid changes each time a new version is promoted. Store and compare _entry. It is present on every rendered component, not just library entries.
  • The entry follows its own lifecycle. Promote a new version of the author and every field pointing at them shows it, with the referencing content never touched. Withdraw it, or hard-delete the entry, and the field reads back as null rather than as something stale - the page renders around the hole.
  • Only published entries resolve, including for the CMS's own editor: previewing an article shows the published author, not an unpromoted draft of them. Same rule as a library query.
  • Nesting is capped. Entries may reference entries - an author naming an editor - sharing one 3-level budget with library queries, so two entries pointing at each other terminate instead of recursing forever.
  • Breadth is capped too. A render resolves at most 500 library entries in total, however they are spread across picks, library queries and nesting levels. Past that, further entries resolve as null and the response carries "_truncated": true at the top level
    • the key is absent on any response that resolved everything, so it never has to be read to be trusted. null rather than a partial entry because it is already what a pick whose entry was withdrawn or deleted renders as. A page hitting this is almost always a schema fanning out wider than intended rather than a real editorial need.
  • Editing reads the pick, not the entry. A request rendering with configuration (an internal token, i.e. the CMS's own editor) gets {"id": "...", "title": "..."} back instead: which entry is picked and a cached copy of its label, which is what a picker needs and what can be put back. title comes from the library's labelField and is a display cache, never the source of truth.

Local References ​

Reference definitions within the same schema using #/definitions/:

json
{
  "definitions": {
    "image": {
      "type": "object",
      "properties": {
        "id": {"type": "string", "format": "uuid"}
      },
      "required": ["id"]
    }
  },
  "type": "object",
  "properties": {
    "image": {
      "$ref": "#/definitions/image"
    }
  }
}

Array Items with References ​

You can use references for array items:

json
{
  "definitions": {
    "address": {
      "type": "object",
      "properties": {
        "street": {"type": "string"},
        "city": {"type": "string"},
        "zipcode": {"type": "string"}
      },
      "required": ["street", "city"]
    }
  },
  "type": "object",
  "properties": {
    "name": {"type": "string"},
    "addresses": {
      "type": "array",
      "items": {"$ref": "#/definitions/address"}
    }
  }
}

Content Example:

json
{
  "name": "John Doe",
  "addresses": [
    {
      "street": "123 Main St",
      "city": "New York",
      "zipcode": "10001"
    },
    {
      "street": "456 Oak Ave",
      "city": "Boston",
      "zipcode": "02101"
    }
  ]
}

Circular References ​

Circular references are supported and useful for tree structures, linked lists, and nested hierarchies:

json
{
  "definitions": {
    "node": {
      "type": "object",
      "properties": {
        "value": {"type": "string"},
        "next": {"$ref": "#/definitions/node"}
      }
    }
  },
  "$ref": "#/definitions/node"
}

Content Example (Linked List):

json
{
  "value": "first",
  "next": {
    "value": "second",
    "next": {
      "value": "third",
      "next": {
        "value": "fourth"
      }
    }
  }
}

Chained References ​

References can be chained - one definition can reference another:

json
{
  "definitions": {
    "contactInfo": {
      "type": "object",
      "properties": {
        "email": {"type": "string"},
        "phone": {"type": "string"}
      },
      "required": ["email"]
    },
    "user": {
      "type": "object",
      "properties": {
        "name": {"type": "string"},
        "contact": {"$ref": "#/definitions/contactInfo"}
      },
      "required": ["name", "contact"]
    },
    "profile": {
      "type": "object",
      "properties": {
        "user": {"$ref": "#/definitions/user"},
        "bio": {"type": "string"},
        "avatar": {"$ref": "http://access.flatnode.net/file-reference.schema.json#"}
      },
      "required": ["user"]
    }
  },
  "type": "object",
  "properties": {
    "profile": {"$ref": "#/definitions/profile"}
  }
}

Stacking Schemas ​

The real power comes from combining slots and references together. You can create deeply nested, flexible content structures.

Nested Slots ​

Slots can be nested to create hierarchical content structures:

Example: Page → Sections → Blocks → Elements

Step 1: Create Page Component (with sections slot)

json
{
  "title": "Page Component",
  "type": "object",
  "properties": {
    "title": {"type": "string"},
    "description": {"type": "string"},
    "sections": {
      "$ref": "http://access.flatnode.net/slot/sections#"
    }
  }
}

Step 2: Create Section Component (with blocks slot)

json
{
  "title": "Section Component",
  "type": "object",
  "properties": {
    "heading": {"type": "string"},
    "subheading": {"type": "string"},
    "blocks": {
      "$ref": "http://access.flatnode.net/slot/blocks#"
    }
  }
}

Step 3: Create Block Component (with elements slot)

json
{
  "title": "Block Component",
  "type": "object",
  "properties": {
    "type": {"type": "string"},
    "content": {"type": "string"},
    "elements": {
      "$ref": "http://access.flatnode.net/slot/elements#"
    }
  }
}

Step 4: Build the Structure

bash
# 1. Create page content
curl -X POST "https://admin.flatnode.net/api/v1/content" \
  -H "Authorization: Bearer your-token-here" \
  -H "Content-Type: application/json" \
  -d '{
    "DocumentId": "550e8400-e29b-41d4-a716-446655440000",
    "ComponentId": "aa0e8400-e29b-41d4-a716-446655440005",
    "position": "first",
    "data": {
      "title": "My Test Page",
      "description": "A page with nested slots"
    }
  }'
# Response: data._uuid is the uuid used below as pageId

# 2. Add section to page's "sections" slot
curl -X POST "https://admin.flatnode.net/api/v1/content" \
  -H "Authorization: Bearer your-token-here" \
  -H "Content-Type: application/json" \
  -d '{
    "DocumentId": "550e8400-e29b-41d4-a716-446655440000",
    "ComponentId": "bb0e8400-e29b-41d4-a716-446655440006",
    "parent": {
      "HostContentId": pageId,
      "Slot": "sections"
    },
    "position": "first",
    "data": {
      "heading": "First Section",
      "subheading": "This section contains blocks"
    }
  }'
# Response: data._uuid -> sectionId

# 3. Add block to section's "blocks" slot
curl -X POST "https://admin.flatnode.net/api/v1/content" \
  -H "Authorization: Bearer your-token-here" \
  -H "Content-Type: application/json" \
  -d '{
    "DocumentId": "550e8400-e29b-41d4-a716-446655440000",
    "ComponentId": "cc0e8400-e29b-41d4-a716-446655440007",
    "parent": {
      "HostContentId": sectionId,
      "Slot": "blocks"
    },
    "position": "first",
    "data": {
      "type": "text",
      "content": "First block inside a section"
    }
  }'
# Response: data._uuid -> blockId

# 4. Add element to block's "elements" slot
curl -X POST "https://admin.flatnode.net/api/v1/content" \
  -H "Authorization: Bearer your-token-here" \
  -H "Content-Type: application/json" \
  -d '{
    "DocumentId": "550e8400-e29b-41d4-a716-446655440000",
    "ComponentId": "cc0e8400-e29b-41d4-a716-446655440007",
    "parent": {
      "HostContentId": blockId,
      "Slot": "elements"
    },
    "position": "first",
    "data": {
      "type": "nested-1",
      "content": "First nested block inside first block"
    }
  }'

Each of the four content nodes created above (page, section, block, element) needs its own promote() call before it's visible to anything but the CMS's own editor - see Visibility.

Combining References and Slots ​

You can combine component references with slots for maximum flexibility:

Example: Component with both a reference and a slot

json
{
  "title": "Rich Content Block",
  "type": "object",
  "properties": {
    "title": {"type": "string"},
    "image": {
      "$ref": "http://access.flatnode.net/file-reference.schema.json#"
    },
    "content": {
      "$ref": "http://access.flatnode.net/uuid/550e8400-e29b-41d4-a716-446655440000"
    },
    "widgets": {
      "$ref": "http://access.flatnode.net/slot/widgets#"
    }
  }
}

This component:

  • Has a direct property (title)
  • References a file schema (image)
  • References another component (content)
  • Has a slot for dynamic content (widgets)

Examples ​

Complete Example: Blog Post with Comments ​

Component 1: Comment (with nested comments slot)

json
{
  "title": "Comment Component",
  "type": "object",
  "properties": {
    "author": {"type": "string"},
    "text": {"type": "string"},
    "replies": {
      "$ref": "http://access.flatnode.net/slot/replies#"
    }
  }
}

Component 2: Blog Post (with comments slot)

json
{
  "title": "Blog Post Component",
  "type": "object",
  "properties": {
    "title": {"type": "string"},
    "content": {"type": "string"},
    "author": {
      "$ref": "http://access.flatnode.net/uuid/user-component-uuid"
    },
    "featuredImage": {
      "$ref": "http://access.flatnode.net/file-reference.schema.json#"
    },
    "comments": {
      "$ref": "http://access.flatnode.net/slot/comments#"
    }
  }
}

Workflow:

  1. Create blog post content
  2. Add comments to the post's comments slot
  3. Add replies to comments' replies slot

This creates a nested structure: Post → Comments → Replies

Example: Product Catalog ​

Component: Product (with variants slot and category reference)

json
{
  "title": "Product Component",
  "type": "object",
  "properties": {
    "name": {"type": "string"},
    "description": {"type": "string"},
    "price": {"type": "number"},
    "images": {
      "type": "array",
      "items": {
        "$ref": "http://access.flatnode.net/file-reference.schema.json#"
      }
    },
    "category": {
      "$ref": "http://access.flatnode.net/uuid/category-component-uuid"
    },
    "variants": {
      "$ref": "http://access.flatnode.net/slot/variants#"
    }
  }
}

Best Practices ​

  1. Use slots for dynamic, user-added content - Slots are perfect for areas where users can add/remove items
  2. Use references for reusable structures - References are ideal for shared schemas (user profiles, addresses, etc.)
  3. Combine both for maximum flexibility - Use references for fixed structure, slots for dynamic areas
  4. Name slots descriptively - Use clear names like sections, blocks, items rather than generic names
  5. Keep slot hierarchies shallow when possible - Deep nesting (4+ levels) can be harder to manage
  6. Document your slot and reference patterns - Help other developers understand your schema architecture

Response Structure ​

When retrieving documents with slots and references, the response includes metadata:

json
{
  "_uuid": "ee0e8400-e29b-41d4-a716-446655440009",
  "_type": "component",
  "_component": "550e8400-e29b-41d4-a716-446655440000",
  "_value": {
    "title": "My Page",
    "sections": [
      {
        "_uuid": "ff0e8400-e29b-41d4-a716-44665544000a",
        "_type": "component",
        "_component": "660e8400-e29b-41d4-a716-446655440001",
        "_value": {
          "heading": "Section Title",
          "blocks": [...]
        }
      }
    ]
  }
}

Each slotted item includes _uuid, _type, _component, and _value fields for full context, plus _handle when the component behind it has a handle set (see Handles) - that's the field to switch on when deciding which frontend component renders a block.

The two id fields are both uuids but name different things: _uuid is this content node's own identifier - what parent.HostContentId expects (see Adding Content to Slots above) and what every /content/{uuid} route takes, including the version-workflow ones (/promote, /submit, /approve, ... - see Content Versions) - while _component is the uuid of the component SCHEMA the block was built from, the same identifier a $ref uses (.../uuid/<componentUuid>).