Update entity

This endpoint allows users to update the entity with specific configurations, including categories, geometries, properties, and titles.


Method: PUT

api/entities/:id

{id} - product id

Request Headers

x-token: 83d7e09f5cce1de1b1fc18f312667785ee6502cfb13f35ff98902a2fd0ecbb99

{
    "categoriesProduct": [
        "9029"
    ],
    "configurationAppId": "0",
    "countryRestrictions": [],
    "fixedSize": 0,
    "geometries": [
        {
            "md5": "6cf0328ca9953348b552376db727e08e",
            "materialId": 1556,
            "name": "mesh_0",
            "names": {},
            "source": "bank"
        },
        {
            "md5": "cd0438e02eb3ae2e581eea381724ea9a",
            "materialId": 548,
            "name": "mesh_1",
            "names": {},
            "source": "bank"
        },
        {
            "md5": "8e7d115a2ad985bd42f8b304b281c941",
            "materialId": 1554,
            "name": "mesh_2",
            "names": {},
            "source": "bank"
        }
    ],
    "isOriginalModel": 1,
    "metaZip": "",
    "originalEntityId": "0",
    "preview": "39787506ef98cffb7def00a62ec812fc",
    "previewMode": 0,
    "properties": {
        "appointment": "scene",
        "contourTop": "0.04,22,1.83,21.92,3.61,21.7,5.37,21.33,7.09,20.83,8.76,20.18,10.38,19.4,11.93,18.49,15.8,15.81,16.25,15.47,16.7,15.1,17.14,14.71,17.56,14.29,17.97,13.84,18.36,13.38,18.72,12.89,19.06,12.4,19.38,11.89,19.67,11.37,19.92,10.85,20.15,10.33,20.34,9.81,20.5,9.29,20.63,8.79,21.64,3.97,21.89,2.19,22,0.4,21.96,-1.39,21.77,-3.18,21.44,-4.94,20.97,-6.67,20.36,-8.36,19.61,-9.99,18.73,-11.56,17.73,-13.05,16.6,-14.45,15.37,-15.76,14.04,-16.96,12.61,-18.04,11.1,-19.01,9.51,-19.85,7.86,-20.56,6.16,-21.14,4.42,-21.57,2.65,-21.86,0.86,-22,-0.94,-22,-2.73,-21.85,-4.5,-21.55,-6.24,-21.11,-7.94,-20.54,-9.58,-19.82,-11.17,-18.97,-12.67,-18,-14.1,-16.91,-15.43,-15.7,-16.66,-14.39,-17.77,-12.99,-18.77,-11.49,-19.64,-9.93,-20.39,-8.29,-20.99,-6.6,-21.46,-4.87,-21.79,-3.1,-21.97,-1.32,-22,0.48,-21.89,2.27,-21.63,4.05,-21.23,5.8,-20.68,7.51,-20,9.17,-19.19,10.77,-18.24,12.3,-17.18,13.74,-16,15.1,-14.72,16.35,-13.34,17.5,-11.87,18.53,-10.32,19.43,-8.7,20.21,-7.02,20.85,-5.3,21.35,-3.54,21.71,-1.76,21.93",
        "contourCut": "21.79,0,22,-0.17,22,-0.81,20.79,-91.09,20.77,-91.49,20.72,-91.85,13.92,-135.01,13.83,-135.47,1.99,-191.51,1.8,-192,1.48,-192.41,1.08,-192.73,0.6,-192.93,0.1,-193,-0.38,-192.93,-0.89,-192.73,-1.29,-192.41,-1.6,-192,-1.8,-191.51,-6.31,-150.47,-22,-0.81,-22,-0.17,-21.79,0,5.32,0,20.77,0,21.57,0",
        "depth": 44,
        "height": 193,
        "positionY": 0,
        "width": 44,  
    },
    "public": true,
    "source": "8e8821d86d8081c743455adcaeea7c8c",
    "svg_file": "",
    "tags": [],
    "titles": {
        "en": "Cabinet",
        "ru": "",
        "ua": "",
        "de": "",
        "fr": ""
    },
    "userPlanId": "0",
    "type": 2,
}

Request Parameters

  • categoriesProduct: An array of product categories.

  • categoriesMaterial: An array of material categories.

  • configurationAppId: A value representing the configuration application ID.

  • countryRestrictions: An array specifying country restrictions.

  • fixedSize: A value indicating if the model has a fixed size (0 or 1).

  • geometries: An array of objects representing the geometries of the model. Each geometry object should included:

    • md5: A string representing the MD5 hash of the geometry file.
    • materialId: An integer representing the material ID.
    • name: A string representing the name of the geometry.
    • names: An object containing localized names (optional).
    • source: A string indicating the source of the geometry ("bank", "none", "set").
    • setId: An integer representing the set of materials ID (if source: "set").
  • isOriginalModel: An integer indicating if the model is original (Default is 1).

  • metaZip: A string for the metadata zip file (optional).

  • originalEntityId: A string representing the original entity ID (Default is "0").

  • preview: A string representing the preview image.

  • previewMode: An integer indicating the preview mode (0 - automatically created, 1 - loaded).

  • properties: An object containing the properties of the model, including:

    • appointment: A string representing the appointment of the model ("scene" - regular model, "wall" - model built into the wall).
    • contourCut: A string representing the contour cut coordinates. It is needed to cut a hole in the wall for this model.
    • contourTop: A string representing the contour top coordinates. It is needed to cut a hole in the wall for this model.
    • depth: A float representing the depth of the model.
    • height: A float representing the height of the model.
    • positionY: A float representing the elevation of the model.
    • width: A float representing the width of the model.
  • public: A boolean indicating if the model is public.

  • source: A string representing the GLB file.

  • svg_file: A string representing the SVG file (optional).

  • tags: An array of strings representing tags for the model.

  • titles: An object containing localized titles of the model. The keys are language codes (e.g., en, de, fr, ru, ua), and the values are the titles.

  • userPlanId: A value representing the user plan ID. Default is "0".

  • type: An integer representing the type of entity (1 - material, 2 - model, 3 - poster, 4 - carpet).

A most of payload data can be received from Product Info method

width, depth, height can be changed only for products, not for materials

preview, svg_file, metaZip, and source are the files.

If you need to change the file use the upload method

if you don't want that file changed you must use the value from Product Info method