JSON Export – Schema Reference
This document describes the structure of the JSON file produced by the Export as JSON feature in Datastudio.
Top-level structure
{
"schemaVersion": "1",
"exportedAt": "2026-03-18T10:00:00Z",
"tenantName": "Byggfirman AB",
"projectName": "Storgatan 1",
"projectAttributes": {
"Kundnummer": "545454545"
},
"subProjectName": "Lägenhet 1A",
"materialQuantities": [...],
"elements": [...],
"recipes": [...]
}
| Field | Type | Description |
|---|---|
| schemaVersion | string | Schema version. Always "1" for now. |
| exportedAt | string | ISO 8601 UTC timestamp of the export. |
| tenantName | string | Name of the organisation (tenant). |
| projectName | string | Project name. |
| projectAttributes | object | Custom attributes the customer has added to the project, e.g. customer number. Omitted if no custom attributes have been created. See Project attributes. |
| subProjectName | string | Sub-project name (e.g. a specific apartment or floor). |
| materialQuantities | array | Aggregated material quantities across the entire sub-project. See Material quantities. |
| elements | All calculated elements with per-element ingredient breakdowns. See Elements. |
| recipes | All recipes used, with aggregated ingredient quantities. See Recipes. |
Fields whose value is
nullare omitted from the output entirely.
Material quantities
materialQuantities aggregates total quantity of each material/specification combination across all elements.
{
"categoryCode": "KAKEL",
"categoryName": "Kakel",
"materialCode": "VIT",
"materialName": "Kakel Vit",
"specificationCode": "60X60",
"specificationName": "60×60 cm",
"combinedCode": "KAKEL-VIT-60X60",
"quantity": { ... },
"elementRefs": ["EL321", "EL999"]
}
| Field | Description |
|---|---|
categoryCode | Code of the material category. |
categoryName | Name of the material category. |
materialCode | Code of the material. |
materialName | Name of the material. |
specificationCode | Code of the material specification |
specificationName | Name of the material specification |
combinedCode | Category, material, and specification codes joined with -. Example: "KAKEL-VIT-60X60". |
quantity | Total calculated quantity (waste included). See Quantity. |
elementRefs | References to elements that contribute to this quantity. Matches ref values in the elements array. |
Elements
Each entry in elements represents one calculated element (e.g. a room or wall).
{
"ref": "EL321",
"name": "Sovrum",
"elementCategory": "Golv",
"attributes": [
{
"name": "Area",
"displayValue": "12.5 m²",
"valueNumber": 12.5,
"unit": "m²",
"unitCategory": "area",
"attributeType": "UNIT"
}
],
"recipeRefs": ["REC123"],
"recipes": [
{
"ref": "REC123",
"name": "Standardgolv",
"layers": [ ... ]
}
]
}
| Field | Description |
|---|---|
ref | Reference within this export file (e.g. "EL321"). |
name | Element name. |
elementCategory | Element category name (e.g. "Floor", "Wall"). |
attributes | Measured or entered attribute values. See Element attribute. |
recipeRefs | References to applied recipes. Matches ref in the recipes array. |
recipes | Per-element ingredient breakdown for each applied recipe. See ElementRecipe. |
ElementRecipe
{
"ref": "REC123",
"name": "Standardgolv",
"layers": [
{
"name": "Lager 1",
"ingredients": [ ... ]
}
]
}
| Field | Description |
|---|---|
ref | Reference to the recipe. Matches ref in the top-level recipes array. |
name | Recipe name. |
layers | Layers with ingredients. See Layer. |
Recipes
recipes contains one entry per unique recipe used in the sub-project. Quantities are aggregated across all elements that use the recipe.
{
"ref": "REC123",
"name": "Standardgolv",
"elementCategory": "Golv",
"elementRefs": ["EL321", "EL999"],
"layers": [ ... ]
}
| Field | Description |
|---|---|
ref | Reference within this export file. |
name | Recipe name. |
elementCategory | Element category this recipe belongs to. |
elementRefs | References to all elements that use this recipe. |
layers | Layers with aggregated ingredient quantities. See Layer. |
Layer
A layer groups ingredients within a recipe.
{
"name": "Lager 1",
"ingredients": [ ... ]
}
| Field | Description |
|---|---|
name | Layer name. |
ingredients | Ingredients in this layer. See Ingredient. |
Ingredient
An ingredient is a construction material used within a recipe layer.
{
"name": "Kakel",
"categoryCode": "KAKEL",
"categoryName": "Kakel",
"materialCode": "VIT",
"materialName": "Kakel Vit",
"specificationCode": "60X60",
"specificationName": "60×60 cm",
"combinedCode": "KAKEL-VIT-60X60",
"wasteFactor": 1.1,
"isExcludedFromCalculation": true,
"quantity": { ... }
}
| Field | Description |
|---|---|
name | Ingredient name (from the recipe definition). |
categoryCode | Code of the material category. |
categoryName | Name of the material category. |
materialCode | Code of the material. |
materialName | Name of the material. |
specificationCode | Code of the material specification. |
specificationName | Name of the material specification. |
combinedCode | Category, material, and specification codes joined with -. |
wasteFactor | Waste/loss multiplier (e.g. 1.1 = 10% waste). Omitted when no waste is configured. |
isExcludedFromCalculation | true when this ingredient is excluded from totals. |
quantity | Calculated quantity. See Quantity. |
Element attribute
Attribute values measured or entered for an element (e.g. area, length).
{
"name": "Area",
"displayValue": "12.5 m²",
"valueNumber": 12.5,
"unit": "m²",
"unitCategory": "area",
"attributeType": "UNIT"
}
| Field | Description |
|---|---|
name | Attribute name. |
displayValue | The value as a string, e.g. "12.5 m²". |
valueNumber | The value as a number. |
unit | Unit symbol, e.g. "m²", "st". |
unitCategory | Unit category, e.g. "area", "length". |
attributeType | One of "UNIT", "NUMBER", "TEXT", "BOOLEAN". |
Quantity
Quantity objects are used to represent a value, it's unit and it's unit category.
{
"displayValue": "38.5 m²",
"valueNumber": 38.5,
"unit": "m²",
"unitCategory": "area",
"attributeType": "UNIT",
"constructionMaterialSpecWidthMM": 600,
"constructionMaterialSpecDepthMM": 600
}
| Field | Description |
|---|---|
displayValue | The value as a string, e.g. "38.5 m²". |
valueNumber | The value as a number. |
valueBool | The value as true/false. |
valueString | The value as a string. |
unit | Unit symbol, e.g. "m²", "st", "h". |
unitCategory | Unit category, e.g. "area", "length", "time". |
attributeType | One of "UNIT", "NUMBER", "TEXT", "BOOLEAN". |
constructionMaterialSpecWidthMM | Width of the material specification in mm. Used e.g. to convert m² to running metres. |
constructionMaterialSpecDepthMM | Depth/thickness of the material specification in mm. |
Material code system
combinedCode is a convenience field joining all non-empty codes with - in the order Category → Material → Specification.
| Example | combinedCode |
|---|---|
Category KAKEL, Material VIT, Spec 60X60 | KAKEL-VIT-60X60 |
Category KAKEL, Material VIT, no spec | KAKEL-VIT |
Project attributes
Project attributes are custom fields that a user has created under Settings → Attributes → Project attributes. Once created, they appear as fillable fields on the project.
This is not a standard feature. It requires someone to have actively set up custom attributes for the project. If they exist and have been filled in on the project, they are included here. Otherwise projectAttributes is omitted entirely.
"projectAttributes": {
"Kundnummer": "545454545",
"Avtalsreferens": "AVT-2026-001"
}