Attribute

An Attribute is a field your museum adds to its events in the back office, under Settings › Events › Fields, such as a category, a duration or an organiser. Staff fill the fields in on each event, and every Event carries its values in attributes.

Attributes are on events for now. Other objects can get them later, so each attribute names the object it is on in entityType. Read them with List Attributes and Get Attribute. They are read-only in the API: staff set up the attributes in Settings, and set the values on each event in the back office.

PropertyTypeDefaultDescriptionExample
id*string (UUIDv4)Unique identifier. It stays the same when the attribute is renamed"0b4e6f1a-2c3d-4e5f-8a9b-1c2d3e4f5a6b"
entityType*stringThe object the attribute is on. EVENT is the only one for now"EVENT"
name*stringName of the attribute, as staff wrote it. It has no translations: attribute names can't be translated in the back office yet"Kategori"
type*stringThe kind of value: TEXT, NUMBER, BOOLEAN, DATE or SELECT (see Values below)"SELECT"
multiplebooleanWhether more than one option can be chosen. It is set when the attribute is created. Only included on SELECT attributesfalse
optionsarrayA list of AttributeOption objects to choose from, in the order set in Settings. It holds every option, also options no event has yet. Only included on SELECT attributes[{ "id": "7c1d2e3f-4a5b-4c6d-9e8f-0a1b2c3d4e5f", "masterLanguage": "da", "name": "Udforsk", "translations": [{ "language": "en", "name": "Explore" }] }]
Copy
{ "id": "0b4e6f1a-2c3d-4e5f-8a9b-1c2d3e4f5a6b", "entityType": "EVENT", "name": "Kategori", "type": "SELECT", "multiple": false, "options": [ { "id": "7c1d2e3f-4a5b-4c6d-9e8f-0a1b2c3d4e5f", "masterLanguage": "da", "name": "Udforsk", "translations": [{ "language": "en", "name": "Explore" }] }, { "id": "a2f9b8c7-d6e5-4f4a-8b3c-2d1e0f9a8b7c", "masterLanguage": "da", "name": "Omvisning", "translations": [] } ] }

AttributeOption

An AttributeOption is one of the choices of a SELECT attribute.

PropertyTypeDefaultDescriptionExample
id*string (UUIDv4)Unique identifier. It stays the same when the option is renamed or translated"7c1d2e3f-4a5b-4c6d-9e8f-0a1b2c3d4e5f"
masterLanguagestringThe language name is written in"da"
name*stringName of the option"Udforsk"
translationsarray[]A list of translation objects AttributeOptionTranslation for the option[{ "language": "en", "name": "Explore" }]

AttributeOptionTranslation

An AttributeOptionTranslation is the name of an option in another language.

PropertyTypeDefaultDescriptionExample
language*string (ISO 639-1)Language code for the translation"en"
namestringThe option's name in this language"Explore"

AttributeValue

An AttributeValue is an event's value for one attribute. The event's attributes holds one for every attribute of your museum's events, in the order set in Settings, also when the event has no value for it.

PropertyTypeDefaultDescriptionExample
id*string (UUIDv4)The attribute's id"0b4e6f1a-2c3d-4e5f-8a9b-1c2d3e4f5a6b"
name*stringThe attribute's name"Kategori"
type*stringThe attribute's type"SELECT"
multiplebooleanWhether more than one option can be chosen. Only included on SELECT attributesfalse
valuedepends on typeThe value as stored: an option id for SELECT (see Values below)"7c1d2e3f-4a5b-4c6d-9e8f-0a1b2c3d4e5f"
selectedOptionsarray[]The chosen options as AttributeOption objects, so you have their names without another request. Only included on SELECT attributes[{ "id": "7c1d2e3f-4a5b-4c6d-9e8f-0a1b2c3d4e5f", "masterLanguage": "da", "name": "Udforsk", "translations": [{ "language": "en", "name": "Explore" }] }]

A museum with the fields Kategori (category), Varighed (duration in minutes), Gratis (free), Premiere (opening day) and Arrangør (organiser) gives an event these attributes:

Copy
"attributes": [ { "id": "0b4e6f1a-2c3d-4e5f-8a9b-1c2d3e4f5a6b", "name": "Kategori", "type": "SELECT", "multiple": false, "value": "7c1d2e3f-4a5b-4c6d-9e8f-0a1b2c3d4e5f", "selectedOptions": [ { "id": "7c1d2e3f-4a5b-4c6d-9e8f-0a1b2c3d4e5f", "masterLanguage": "da", "name": "Udforsk", "translations": [{ "language": "en", "name": "Explore" }] } ] }, { "id": "5f2a3b4c-5d6e-4f7a-8b9c-0d1e2f3a4b5c", "name": "Varighed", "type": "NUMBER", "value": 60 }, { "id": "9d3e4f5a-6b7c-4d8e-9f0a-1b2c3d4e5f6a", "name": "Gratis", "type": "BOOLEAN", "value": false }, { "id": "c81f2a3b-4c5d-4e6f-8a7b-9c0d1e2f3a4b", "name": "Premiere", "type": "DATE", "value": "2026-12-01" }, { "id": "e04b5c6d-7e8f-4a9b-8c0d-1e2f3a4b5c6d", "name": "Arrangør", "type": "TEXT", "value": null } ]

Values

value is the value as stored, by the attribute's type:

TypevalueEmptyExample
TEXTstringnull"Kunstforeningen"
NUMBERnumber, a whole numbernull60
BOOLEANbooleanfalsetrue
DATEstring, a day as YYYY-MM-DDnull"2026-12-01"
SELECTstring, the id of the chosen optionnull"7c1d2e3f-4a5b-4c6d-9e8f-0a1b2c3d4e5f"
SELECT with multiplearray of string, the ids of the chosen options[]["7c1d2e3f-4a5b-4c6d-9e8f-0a1b2c3d4e5f", "a2f9b8c7-d6e5-4f4a-8b3c-2d1e0f9a8b7c"]

A BOOLEAN that was never set is false, the same as one set to No.

An option deleted in Settings drops out of both value and selectedOptions, so a single choice whose option was deleted is null. An attribute deleted in Settings drops out of every event's attributes.

A date in a series has the values of its main event.

Languages

The API has no language parameter. Like an event's name, an option's name is written in its masterLanguage, and translations holds the other languages it has: take the translation in your language when there is one, and otherwise name. An attribute's own name has no translations yet.

Show an event's category

  1. Call List Attributes and find the attribute by its name, such as Kategori. Keep its id rather than the name: staff can rename it.
  2. In each event's attributes, take the entry with that id.
  3. Show the name of each of its selectedOptions, in your language: name when its masterLanguage is yours, the matching translation when there is one, and otherwise name.
Copy
const CATEGORY = '0b4e6f1a-2c3d-4e5f-8a9b-1c2d3e4f5a6b' // the attribute's id, from List Attributes function optionName({ option, language }) { if (option.masterLanguage === language) return option.name const translation = option.translations.find(t => t.language === language) return translation ? translation.name : option.name } const category = event.attributes.find(attribute => attribute.id === CATEGORY) const names = category ? category.selectedOptions.map(option => optionName({ option, language: 'en' })) : [] // ['Explore']

Pick the events in one category

Events can't be filtered on an attribute yet, so List Events and pick them yourself. Compare option ids in value, not names: an option keeps its id when it is renamed or translated.

Copy
const EXPLORE = '7c1d2e3f-4a5b-4c6d-9e8f-0a1b2c3d4e5f' // the option's id, from List Attributes function hasOption({ event, attributeId, optionId }) { const attribute = event.attributes.find(a => a.id === attributeId) if (!attribute) return false return Array.isArray(attribute.value) ? attribute.value.includes(optionId) : attribute.value === optionId } const exploreEvents = events.filter(event => hasOption({ event, attributeId: CATEGORY, optionId: EXPLORE }))

For a category menu, take the options from the attribute's options in List Attributes: it lists every option, also those no event has yet.

‹ Previous
Event Ticket
Next ›
Visit