Skip to main content



Items and collection schemas are a preview feature while we gather feedback and improve the feature. Please note that the collection schemas currently is limited to JavaScript Schemas.

Contact us if would like to try it out.

The items method is available only in collection schemas. Method is used to define collection items that goes into the collection view you can fetch in slices from delivery API.

Items example
items: function (sourceEntity, context) {
return context.reference('category')
.children(`type eq 'product'`)
.orderBy({propertyName: 'properties.price', direction: 'desc'})

The items method must return reference builder.

CollectionItemsContext object

The CollectionItemsContext object is passed into the items method and gives you access to a set of methods described below.


referenceReferencing a full schema. References to other schemas are resolved on delivery request time.


The reference are used to reference other views created from either this source entity or another source entity.

When referenced, Enterspeed will resolve the view when requested by the Delivery API so that the data will stay up-to-date if a reference view is updated.

The reference function is the starting point where you can use our fluent API to configure the reference(s) you want (by filter, by originIds, take only top 5, and so on).


Reference schemas are typically used when you are mapping data from another entity. E.g. a page has a reference to another page entity or media entity.

Read more about reference schemas here



schemaAliasstringThe alias of a schema.

Required function calls

After the reference function it's required to call one of the following functions to define what source entities you want references to.


Using the byOriginIds function lets you create a references to a list of source entity by their oringinId.


originIdsstring[]A list of original ids from the source system.
reference by byOriginIds
.byOriginIds( =>

The children function creates a reference to all the children of the current source entity. It's basicly a shortcut for .filter("originParentId eq '{}'").

reference by children
reference by children and type
context.reference("page").children("type eq 'subpage'")

Using the filter function lets you do a dynamic search for source entities you want to make references to.


filterstringYour filtering criteria.

See list of filter examples here

reference by filter
.filter("type eq 'newsArticle'")

Optional function calls

To filter the source entities you are making references to even further you can call some of the following optional functions.


The `limit`` function limits the number of references.


limitnumberThe maximum number of references to return.
reference by filter and limit
.filter("type eq 'newsArticle'")

The order sequence of references.


orderBy{ propertyName: string, direction: "asc" | "desc" }Allows you to specify your desired sorting order.
reference by filter and orderBy
.filter("type eq 'newsArticle'")
.orderBy({ propertyName: "properties.createdDate", direction: "desc"})

The sourceGroup function lets you specify the source group. By default the source group of the current source entity is used.


sourceGroupstringAllows you to define a different source group. The sourceGroupAlias should be equal to the desired source group alias where you want to look for source entities.

If not defined, it uses the current source group.

reference by filter and sourceGroup
.filter("type eq 'newsArticle'")

Slicing options in Delivery API

Example collection: [A B C D E F G H I J]


The start index is inclusive.

  1. Default Request

    • Request: ?handle=products
    • Description: Fetches the first X items in ascending order from the collection. By default, X is 10.
    • Result: [A B C D E F G H I J]
  2. Specified Number of Items

    • Request: ?handle=products(3)
    • Description: Retrieves the first 3 items in ascending order.
    • Result: [A, B, C]
  3. Custom Start and Range

    • Request: ?handle=products(2,3)
    • Description: Starts from the 2nd item and fetches the next 2 items in ascending order.
    • Result: [B, C, D]
  4. Fetching from the End

    • Request: ?handle=products(-3)
    • Description: Retrieves the last 3 items in descending order.
    • Result: [J, I, H]
  5. Custom Reverse Start and Range

    • Request: ?handle=products(-2, 3)
    • Description: Starts 2 items from the end and fetches the 2 preceding items in descending order.
    • Result: [I, H, G]


  • By default, collection size is up to 100 items, can be increased per tenant basis. Please reach out to Enterspeed if needed.
  • Default slice size during delivery request is 10.
  • Maximum slice size during delivery request is 100.