Skip to main content

Master data and types

Master data objects describe the things your data is about: a product, a location, a company, a trade. Each object has a type that defines its properties. The data of an object (timeseries, curves, events and so on) is saved with the object and kept in the Data service and the Event service.

Service: Object (object/v1/{source}). Sources: public, private and common.


Object​

An object is a JSON document with an _id, a _type and any properties you like. Properties defined on its type are checked when you save it.

FieldTypeRequiredWhat it is
_idStringYesThe object id. Public ids start with #
_typeStringNoThe id of the object's type, defaults to #Object. Saving an existing object with #Object keeps its type
_linksObjectNoLinks to other entities, see Links
_accessStringNoA data role used by security policies
(any name)AnyNoA property: a string, number, boolean, list, object, or a data entity such as a timeseries or a curve

Saving an object with data​

Put each data entity in a property of the object, with its _type. The name of the property is the data id: the timeseries below is saved as NGE.POWER.DE:SPOT and the curve as NGE.POWER.DE:BASE:2026-11-18.

{
"_id": "NGE.POWER.DE",
"_type": "#Object",
"name": "German Power",
"commodity": "Power",
"location": "Germany",
"currency": "EUR",
"units": "MWH",
"SPOT": {
"_type": "VarTimeSeries",
"calendar": "DAILY",
"units": "MWH",
"currency": "EUR",
"data": [
{"time": "2026-11-17", "value": 98.42},
{"time": "2026-11-18", "value": 101.07}
]
},
"BASE": {
"_type": "VarCurve",
"ondate": {"curveDate": "2026-11-18", "expiryCalendar": "#REOMHENG"},
"currency": "EUR",
"units": "MWH",
"contracts": [
{"tenor": "M01", "value": 104.25},
{"tenor": "M02", "value": 109.80},
{"tenor": "Q01", "value": 101.15}
]
}
}

A property that is a list of events is saved as an event list.

Reading an object​

When you read the object, each data property is a reference to the data, not the data itself. Read the data with the Data service, or add _profile=SPOT to read it through the Object service.

{
"_id": "NGE.POWER.DE",
"_type": "#Object",
"name": "German Power",
"commodity": "Power",
"location": "Germany",
"currency": "EUR",
"units": "MWH",
"SPOT": {
"_type": "VarReference",
"_service": "data",
"_source": "private",
"_oid": "NGE.POWER.DE:SPOT",
"_otype": "VarTimeSeries"
},
"BASE": {
"_type": "VarReference",
"_service": "data",
"_source": "private",
"_oid": "NGE.POWER.DE:BASE",
"_otype": "VarCurve"
},
"_links": {},
"_oid": "NGE.POWER.DE",
"_version": 3,
"_user": "priya.shah@northgate-energy.com",
"_timestamp": "2026-11-18T17:42:10.311",
"_tag": []
}

Objects whose type is not versioned have no version fields.


Reference​

A reference points at another entity. The platform writes one for each data property of an object, and you can use one anywhere an entity is expected, for example as the base of a smart curve.

FieldTypeWhat it is
_typeStringAlways VarReference
_serviceStringThe service of the entity, for example data, object or event
_sourceStringpublic, private or common
_oidStringThe id of the entity
_otypeStringThe _type of the entity, for example VarCurve
_versionIntegerOptional: a version number
_tagStringOptional: a version tag, used instead of _version
name, descriptionStringCopied from the entity
(any name)StringOptions passed when the reference is read

_links is an object of named references. Each key is the name of the link and each value is a reference. Use links to connect an object to related objects, for example a product to its exchange.

"_links": {
"exchange": {
"_type": "VarReference",
"_service": "object",
"_source": "public",
"_oid": "#EEX"
}
}

Type​

A type defines the properties of objects or events. Service: Type (type/v1/{source}), versioned.

FieldTypeRequiredWhat it is
_idStringYesThe type id. Public types start with #
_typeStringYesAlways Type
_nameStringNoThe name of the type
_descriptionStringNoA description
_extendsStringNoThe id of the type this one extends: it inherits its properties
_versionedBooleanNoKeep versions of objects of this type, defaults to false
_eventBooleanNoTrue for an event type
_mergeEventBooleanNoFor an event type: merge a saved event into the existing event with the same id instead of replacing it
_allowLinksBooleanNoObjects of this type can have _links
_showId, _showType, _showStatusBooleanNoWrite _id, _type and _status when an object of this type is written as JSON
_systemBooleanNoSet on platform types
_scriptStringNoBase64 encoded ODSL that the type was created from
_editorObjectNoSettings for the master data editor
(property name)ObjectNoA property of the type, see below

When you read a type, _superType holds the type it extends, in full.

Type properties​

Every other key of a type is a property definition. _ptype says what kind of property it is.

FieldApplies toWhat it is
_ptypeAllProperty, Expression, Method, Constraint or SmartData
nameAllThe property name
typeAllThe value type: String, Number, Boolean, Date, a dimension, or another type id
displayNameAllThe label shown in screens
descriptionAllA description
errorTextAllAn expression that gives the message shown when the value is not valid
qualifierPropertyA qualifier the type needs, for example a dimension
defaultValuePropertyAn expression that gives the value when none is sent
sortIndexProperty, ExpressionThe order of the property in screens
fieldGroupPropertyA section that groups fields in the editor
bucketPropertyA bucketing expression used when filtering on this property
notnullPropertyTrue if the property must have a value
childrenPropertyChild properties, as property definitions by name
expressionExpression, SmartDataExpression: a Base64 encoded expression that calculates the value. SmartData: the formula of the smart data created on each object
methodMethodBase64 encoded ODSL of the method
conditions, mark, qualityCheckConstraintThe conditions the object must meet, whether to mark rather than reject failures, and the quality check to record
{
"_id": "NGEPowerProduct",
"_type": "Type",
"_name": "Northgate power product",
"_description": "A power product traded by the Northgate desks",
"_extends": "#Object",
"_versioned": true,
"name": {"_ptype": "Property", "name": "name", "type": "String", "displayName": "Name", "sortIndex": 1, "notnull": true},
"country": {"_ptype": "Property", "name": "country", "type": "String", "displayName": "Country", "sortIndex": 2},
"peakHours": {"_ptype": "Property", "name": "peakHours", "type": "Number", "displayName": "Peak hours", "defaultValue": "12", "sortIndex": 3}
}

Currency pair​

A currency pair is a master data object of type #ForeignExchange, read through the Currency service (currency/v1/{source}, read-only).

FieldTypeWhat it is
_idStringThe object id
_typeStringAlways #ForeignExchange
baseStringThe base currency code
currencyStringThe quote currency code
sourceStringThe code of the currency provider, for example ECB
SPOT and other dataReferenceThe rates, as timeseries
{
"_id": "#ECB_FX.EURGBP",
"_type": "#ForeignExchange",
"base": "EUR",
"currency": "GBP",
"source": "ECB",
"SPOT": {
"_type": "VarReference",
"_service": "data",
"_source": "public",
"_oid": "#ECB_FX.EURGBP:SPOT",
"_otype": "VarTimeSeries"
}
}