Skip to main content

Product

  • status - Default value is "1".
  • modelPath - Path to the model file on the server that you will receive in response after uploading file.
  • materialy - Object with material data for each element of the product. Check schema below.
  • main - Object with main data. Check schema below.
  • isPublished - Default value is "false".
{
"status": "1",
"name": "String",
"modelPath": "String",
"materialy": "Object",
"main": "Object",
"isPublished": "Boolean"
}

materialy

Each product has a materialy object that contains material data for each element of the product.

If isVisible is set to false, the element will not be displayed in the product configurator.

Product Configurator

Example of materialy object

   {
"1008": {
"SIFRA": "HDF-4MM1",
"matimg": "uploads/materials/images/hdf_4mm1.jpg",
"grubosc": "4",
"isVisible": false
},
"0_PK2_BAZA_18": {
"nazwa": "Korpus",
"MUID": "PK2_BAZA",
"SIFRA": "PK2-18",
"matimg": "uploads/materials/images/image-plyta_korpus_2-1696571180710-983318690.jpg",
"FULLNAME": "Default White on Cabinet",
"grubosc": "18",
"list": [
"PK2-18"
],
"isVisible": true
}
}

main

Each product has a main object.

  • typ - Type of the product, by default value should be "element".
  • name - Name of the product as string.
  • nameMongo - Name with unique ID
  • visible - As boolean
  • type - Object with two fields: corpus and web
  • szerokosc - Check dimensions schema below.
  • wysokosc - Check dimensions schema below.
  • glebokosc - Check dimensions schema below.
  • params - Object with parameters. Check schema below.
  • objects - Object with elements of the product.
  • fittingsPrice - Array of fittings IDs.

Example of main object

{
"typ": "element",
"name": "V1",
"nameMongo": "V1_XZI23Y898V",
"visible": true,
"type": {
"corpus": "TElement",
"web": "szafka"
},
"szerokosc": {
"type": "suwak",
"nazwa": "Szerokość",
"n_params": "szerokosc",
"decl": "800",
"calc": "800",
"min": "500",
"max": "2000",
"krok": "1",
"visible": true,
"_id": {
"$oid": "651fa9f50bfaafa2a0a612b5"
}
},
"wysokosc": {
"type": "suwak",
"nazwa": "Wysokość",
"n_params": "wysokosc",
"decl": "800",
"calc": "800",
"min": "500",
"max": "2000",
"krok": "1",
"visible": true,
"_id": {
"$oid": "651fa9f50bfaafa2a0a612b6"
}
},
"glebokosc": {
"type": "suwak",
"nazwa": "Głębokość",
"n_params": "glebokosc",
"decl": "700",
"calc": "700",
"min": "500",
"max": "800",
"krok": "1",
"visible": true,
"_id": {
"$oid": "651fa9f50bfaafa2a0a612b7"
}
},
"x": {
"decl": "0",
"calc": "0"
},
"y": {
"decl": "0",
"calc": "0"
},
"z": {
"decl": "",
"calc": "0"
},
"params": {},
"objects": {},
"fittingsPrice": [
{
"$oid": "651ad0d34db2b44520784368"
},
{
"$oid": "651ad0d34db2b4452078436e"
}
]
}

dimensions

Each dimension has the following fields:

  • type - Type of the dimension, by default value should be "suwak".
  • nazwa - Name of the dimension as string - this is what end user will see in the e-commerce app. This can also be later edited in the admin dashboard.
  • n_params - Name of the dimension as string. This is only for internal use.
  • decl - Default value of the dimension.
  • calc - Calculated value of the dimension.
  • min - Minimum value of the dimension.
  • max - Maximum value of the dimension.
  • krok - Step value of the dimension.
  • visible - As boolean.

Example of dimensions object

{
"type": "suwak",
"nazwa": "Szerokość",
"n_params": "szerokosc",
"decl": "800",
"calc": "800",
"min": "500",
"max": "2000",
"krok": "1",
"visible": true,
"_id": {
"$oid": "651fa9f50bfaafa2a0a612b5"
}
}

params

Each product has a params object.

Common fields for all parameters:

  • type - Type of the parameter, it can be either "suwak" for range input or "lista" for list of buttons.
  • nazwa - Name of the parameter as string.
  • n_params - Name of the parameter as string. This is only for internal use.
  • visible - As boolean.

Fields for suwak type:

  • decl - Default value of the parameter.
  • calc - Calculated value of the parameter.
  • min - Minimum value of the parameter.
  • max - Maximum value of the parameter.
  • krok - Step value of the parameter.
  • listOf - Empty object.

Fields for lista type:

  • listOf - Object with list of buttons. Check schema below.

    Product Configurator

Example of params object

      {
"wysokosc_nozki": {
"type": "suwak",
"nazwa": {
"pl": "wysokosc_nozki"
},
"n_params": "wysokosc_nozki",
"decl": "100",
"calc": "100",
"min": "50",
"max": "200",
"krok": "1",
"visible": true,
"listOf": {}
},
"typ_nawiertow_3d": {
"type": "lista",
"nazwa": {
"pl": "Typ połączenia"
},
"n_params": "TYP_NAWIERTOW_3D",
"listOf": {
"0": {
"name": {
"pl": "kołek"
},
"isVisible": true
},
"1": {
"name": {
"pl": "konfirmat"
},
"isVisible": true
},
"3": {
"name": {
"pl": "minifix"
},
"isVisible": true
},
"5": {
"name": {
"pl": "VB35(rafix)"
},
"isVisible": true
},
"6": {
"name": {
"pl": "VB36"
},
"isVisible": true
},
"14": {
"name": {
"pl": "cabineo"
},
"isVisible": true
}
},
"visible": true
}
}

objects

Each product has an objects object.

  • bok_lewy - Object with element data. Check schema below.
  • kierunek - Direction of the element.
  • typ - Type of the element.
  • name - Name of the element.
  • nameMongo - Name with unique ID.
  • visible - As string.
  • grubosc - Thickness of the element.
  • attrs - Object with attributes. Default value should be as "otvaranje": "nie front".
  • category - Category of the element - it should match a key value from materialy object.
  • szerokosc - Object with width data. Check dimensions schema below.
  • wysokosc - Object with height data. Check dimensions schema below.
  • glebokosc - Object with depth data. Check dimensions schema below.
  • x - Object with x data. Check dimensions schema below.
  • y - Object with y data. Check dimensions schema below.
  • z - Object with z data. Check dimensions schema below.
  • obrot - Object with rotation data.
  • krawedzie - Array of edges. Order of edges should be as follows: ["right edge", "left edge", "top edge", "bottom edge", "front edge", "back edge"].
  • pvc - Array of PVC edges. groupID value is taken from edgeBands_new collection.
  • obrocenie - As string.
  • hasCurve - As string.
  • has3dModel - As string.
  • macros - Array of macros.

Example of form element

{
"bok_lewy": {
"kierunek": "Pion_bok",
"typ": "formatka",
"name": "bok_lewy",
"nameMongo": "bok_lewy_9KEEG4B8N1",
"visible": "true",
"grubosc": "18",
"attrs": {
"otvaranje": "nie front"
},
"category": "0_PK2_BAZA_18",
"szerokosc": {
"decl": "0-branch.objects.plecy.z.calc-branch.objects.plecy.grubosc",
"calc": "556"
},
"wysokosc": {
"decl": "branch.wysokosc.calc-branch.objects.wieniec_dolny.y.calc",
"calc": "700"
},
"glebokosc": {
"decl": "18",
"calc": "18"
},
"x": {
"decl": "0",
"calc": "0"
},
"y": {
"decl": "branch.objects.wieniec_dolny.y.calc",
"calc": "100"
},
"z": {
"decl": "0",
"calc": "0"
},
"obrot": {
"x": "0",
"y": "0",
"z": "0"
},
"krawedzie": [
"0_PK2_BAZA_18",
"0_PK2_BAZA_18",
"brak",
"brak",
"0_PK2_BAZA_18",
"brak"
],
"pvc": [
{
"name": "brak",
"groupID": "brak"
},
{
"name": "brak",
"groupID": "brak"
},
{
"name": "brak",
"groupID": "brak"
},
{
"name": "brak",
"groupID": "brak"
},
{
"name": "PCV 1mm",
"groupID": "O21813"
},
{
"name": "brak",
"groupID": "brak"
}
],
"obrocenie": "false",
"hasCurve": "false",
"has3dModel": "false",
"macros": []
}
}