Skip to content

Lists and modules

A module is a kind of content, such as products, vacancies, events or reviews. An agency defines it, and switches it on per site. site.modules lists each module, with its key, label, fields, relations, schema, display, and labels per language.

A record

A record is an entry with type: "record" and module: "<key>". It has:

  • fields, which are the same in every language, and locales.<lang>.fields, which are all fields per language. They are typed.
  • relations, with per relation the live entries it points at, in order. Each entry has its tags.
  • addresses per language, as a list with the canonical address first, and canonical. A record has an address under every page that it points at with a relation that gives addresses.

GET list/&lt;entry id&gt;

This gives the live records that point at that entry, or at a page below it, for an overview:

?lang=&page=&per=&sort=&tag=&<relation>=<ids>

  • The answer has items as list items, total, page, per and sort. A list item has id, title, address, image, intro, the fields shown in lists, relations and json_ld. per is 24 by default, and at most 100.
  • Filters are:
    • <relation>=<ids>. It is AND between relations, and OR within one relation;
    • tag=;
    • dates, with <field>_gte, <field>_lte and year=;
    • fields that are filters, such as kleur=rood,blauw, price=100..500 and sale=1.
  • Facets are given per relation, as years, and as field_facets. field_facets are choices, range or yes. Each facet is counted with every filter except its own.
  • Sort is sort, which is the order of the CMS, or title, new, or a field. A - in front turns it around.

Pages per year

A page with Per year has list_addresses in the manifest. Per language that is [{address, params: {year}, title, count}]. Answer each address with that page, and pass params to GET list.

Good to know

  • Give a filtered overview noindex, follow, and a canonical to the page without filters.
  • A module can show records only between two date fields. Outside them, a record does not exist anywhere in the API.

Also called: collections, custom post types, catalogue API, faceted search, filtering, pagination.

Last changed