Bulk upload

This API is used for bulk uploading products and materials.

api/merchant/upload_products

params
type

  • 1 for materials import
  • 2 for models import
  • 3 for posters
  • 4 for carpets
  • 5 for plinths

Method POST

request send with form-data format these fields:
dump - CSV file with content from 3D-models import, 3D-materials import

x-token: 202cb962ac59075b964b07152d234b70

maximum rows in CSV file must be less or equal to 5 (while testing)

response
in response, the server return imported items with new/updated entityId from r2d engine

{
    "status": "ok",
    "data": [
        {
            "geometries": [
                {
                    "name": "mesh_0",
                    "materialId": "536",
                    "source": "bank",
                    "position": "0",
                    "geometryId": "103408",
                    "md5": "6cf0328ca9953348b552376db727e08e"
                },
                {
                    "name": "mesh_1",
                    "materialId": "1588",
                    "source": "bank",
                    "position": "1",
                    "geometryId": "103409",
                    "md5": "2cf0328ca9953348b552376db727e08e"
                },
                {
                    "name": "mesh_2",
                    "materialId": "1555",
                    "source": "none",
                    "position": "2",
                    "geometryId": "103410",
                    "md5": "1cf0328ca9953348b552376db727e08e"
                }
            ],
            "crmId": "123456781",
            "entityId": "32755"
        },
        {
            "geometries": [
                {
                    "name": "mesh_3",
                    "materialId": "2924",
                    "source": "bank",
                    "position": "0",
                    "geometryId": "103411",
                    "md5": "9cf0328ca9953348b552376db727e08e"
                },
                {
                    "name": "mesh_0",
                    "materialId": "882",
                    "source": "bank",
                    "position": "1",
                    "geometryId": "103412",
                    "md5": "8cf0328ca9953348b552376db727e08e"
                },
                {
                    "name": "mesh_1",
                    "materialId": "839",
                    "source": "bank",
                    "position": "2",
                    "geometryId": "103413",
                    "md5": "7cf0328ca9953348b552376db727e08e"
                },
                {
                    "name": "mesh_2",
                    "materialId": "1596",
                    "source": "bank",
                    "position": "3",
                    "geometryId": "103414",
                    "md5": "6cf0328ca9953348b552376db727e08e"
                }
            ],
            "crmId": "123456782",
            "entityId": "32756"
        }
    ]
}

response format:

geometries list of geometry objects with fields:

  • name - name of geometry
  • source - the source of linked material (bank, set, none)
    -- bank - merchant material catalog
    -- set - fixed list items of materials
    -- none - fixed material from the uploaded model
  • materialId - default material id
  • geometryId - system id of geometry
  • position - order of geometry in model
  • md5 - unique geometry value, can be used for geometry updating

crmId - imported CRM id
entityId - id of product in r2d system