Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To apply materials, you need to fill in the room’s surfaces with the appropriate product information. For each surface (floor, wall, ceiling), you can specify a material to apply.

Legacy request body:

Code Block
{
    "room_data": {
        "room": {
            "id": "fa4e3811-0287-4176-9fb1-1a1b360d338b",
            "walls": [
                {
                    "wall_id": 0,
                    "is_active": true,
                    "custom_rotation_angle": 0,
                    "wallpaper": {
                        "uuid": "09d58e60-dd4d-4ded-ac7b-c5500d9035f0",
                        "is_visible": true,
                        "product_type": {
                            "uuid": "c2a62091-c2ed-4958-9358-538dcfa122ee",
                            "code": "wallpaper"
                        },
                        "preview_image_path": "pim-data/a78d0200-78ce-444b-a34a-e2fb2829d03a/12665/one_item_preview_color.jpg",
                        "width": 1,
                        "product_width": 1,
                        "length": null,
                        "reverse_180": false,
                        "rapport_shift": null,
                        "scene_data": {
                            "data": [
                                {
                                    "type": "laying-pattern",
                                    "code": "no_pattern",
                                    "is_default": true,
                                    "material_maps": {
                                        "color": "pim-data/a78d0200-78ce-444b-a34a-e2fb2829d03a/12665/09d58e60-dd4d-4ded-ac7b-c5500d9035f0/no_pattern/663f75bd709738f9a23376c38293f47d_one_item_color.png",
                                        "normal": "pim-data/a78d0200-78ce-444b-a34a-e2fb2829d03a/12665/09d58e60-dd4d-4ded-ac7b-c5500d9035f0/no_pattern/663f75bd709738f9a23376c38293f47d_one_item_normal.png",
                                        "metalness": "pim-data/a78d0200-78ce-444b-a34a-e2fb2829d03a/12665/09d58e60-dd4d-4ded-ac7b-c5500d9035f0/no_pattern/663f75bd709738f9a23376c38293f47d_one_item_metal.png",
                                        "roughness": "pim-data/a78d0200-78ce-444b-a34a-e2fb2829d03a/12665/09d58e60-dd4d-4ded-ac7b-c5500d9035f0/no_pattern/663f75bd709738f9a23376c38293f47d_one_item_roughness.png"
                                    },
                                    "pattern_length": null,
                                    "pattern_width": null
                                }
                            ]
                        },
                        "product_length": null,
                        "pattern": null
                    }
                },
                {
                    "wall_id": 1,
                    "is_active": true,
                    "custom_rotation_angle": 0,
                    "wallpaper": {
                        "uuid": "09d58e60-dd4d-4ded-ac7b-c5500d9035f0",
                        "is_visible": true,
                        "product_type": {
                            "uuid": "c2a62091-c2ed-4958-9358-538dcfa122ee",
                            "code": "wallpaper"
                        },
                        "width": 1,
                        "product_width": 1,
                        "length": null,
                        "reverse_180": false,
                        "rapport_shift": null,
                        "scene_data": {
                            "data": [
                                {
                                    "type": "laying-pattern",
                                    "code": "no_pattern",
                                    "is_default": true,
                                    "material_maps": {
                                        "color": "pim-data/a78d0200-78ce-444b-a34a-e2fb2829d03a/12665/09d58e60-dd4d-4ded-ac7b-c5500d9035f0/no_pattern/663f75bd709738f9a23376c38293f47d_one_item_color.png",
                                        "normal": "pim-data/a78d0200-78ce-444b-a34a-e2fb2829d03a/12665/09d58e60-dd4d-4ded-ac7b-c5500d9035f0/no_pattern/663f75bd709738f9a23376c38293f47d_one_item_normal.png",
                                        "metalness": "pim-data/a78d0200-78ce-444b-a34a-e2fb2829d03a/12665/09d58e60-dd4d-4ded-ac7b-c5500d9035f0/no_pattern/663f75bd709738f9a23376c38293f47d_one_item_metal.png",
                                        "roughness": "pim-data/a78d0200-78ce-444b-a34a-e2fb2829d03a/12665/09d58e60-dd4d-4ded-ac7b-c5500d9035f0/no_pattern/663f75bd709738f9a23376c38293f47d_one_item_roughness.png"
                                    },
                                    "pattern_length": null,
                                    "pattern_width": null
                                }
                            ]
                        },
                        "product_length": null,
                        "pattern": null
                    }
                }
            ]
        }
    }
}

If you want to apply a material to a surface, include the material object for that surface. If no material is passed for a surface, no changes will be made to it.

...