Skip to main content

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 null are 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"]
}
FieldDescription
categoryCodeCode of the material category.
categoryNameName of the material category.
materialCodeCode of the material.
materialNameName of the material.
specificationCodeCode of the material specification
specificationNameName of the material specification
combinedCodeCategory, material, and specification codes joined with -. Example: "KAKEL-VIT-60X60".
quantityTotal calculated quantity (waste included). See Quantity.
elementRefsReferences 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": [ ... ]
}
]
}
FieldDescription
refReference within this export file (e.g. "EL321").
nameElement name.
elementCategoryElement category name (e.g. "Floor", "Wall").
attributesMeasured or entered attribute values. See Element attribute.
recipeRefsReferences to applied recipes. Matches ref in the recipes array.
recipesPer-element ingredient breakdown for each applied recipe. See ElementRecipe.

ElementRecipe

{
"ref": "REC123",
"name": "Standardgolv",
"layers": [
{
"name": "Lager 1",
"ingredients": [ ... ]
}
]
}
FieldDescription
refReference to the recipe. Matches ref in the top-level recipes array.
nameRecipe name.
layersLayers 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": [ ... ]
}
FieldDescription
refReference within this export file.
nameRecipe name.
elementCategoryElement category this recipe belongs to.
elementRefsReferences to all elements that use this recipe.
layersLayers with aggregated ingredient quantities. See Layer.

Layer

A layer groups ingredients within a recipe.

{
"name": "Lager 1",
"ingredients": [ ... ]
}
FieldDescription
nameLayer name.
ingredientsIngredients 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": { ... }
}
FieldDescription
nameIngredient name (from the recipe definition).
categoryCodeCode of the material category.
categoryNameName of the material category.
materialCodeCode of the material.
materialNameName of the material.
specificationCodeCode of the material specification.
specificationNameName of the material specification.
combinedCodeCategory, material, and specification codes joined with -.
wasteFactorWaste/loss multiplier (e.g. 1.1 = 10% waste). Omitted when no waste is configured.
isExcludedFromCalculationtrue when this ingredient is excluded from totals.
quantityCalculated 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"
}
FieldDescription
nameAttribute name.
displayValueThe value as a string, e.g. "12.5 m²".
valueNumberThe value as a number.
unitUnit symbol, e.g. "m²", "st".
unitCategoryUnit category, e.g. "area", "length".
attributeTypeOne 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
}
FieldDescription
displayValueThe value as a string, e.g. "38.5 m²".
valueNumberThe value as a number.
valueBoolThe value as true/false.
valueStringThe value as a string.
unitUnit symbol, e.g. "m²", "st", "h".
unitCategoryUnit category, e.g. "area", "length", "time".
attributeTypeOne of "UNIT", "NUMBER", "TEXT", "BOOLEAN".
constructionMaterialSpecWidthMMWidth of the material specification in mm. Used e.g. to convert m² to running metres.
constructionMaterialSpecDepthMMDepth/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.

ExamplecombinedCode
Category KAKEL, Material VIT, Spec 60X60KAKEL-VIT-60X60
Category KAKEL, Material VIT, no specKAKEL-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"
}