CrystallizeAPI/import-utilities

Add the ability to attach topics to images in products import

lrydzkowski opened this issue · 0 comments

Hi, could you add the ability to attach topics to images in products import?
I would like to be able to build JsonSpec object in the following way (look at spec.items[0].variants[0].images[0].topics):

const spec: JsonSpec = {
  items: [{
      externalReference: 'test1',
      name: 'Test',
      shape: 'test-shape',
      vatType: 'Norge',
      parentCataloguePath: '/import-test',
      variants: [{
          name: 'Test',
          sku: 'test-sku',
          images: [{
              src: 'https://hageland.no/wp-content/uploads/2019/03/peppermyntebusk-16.jpg',
              altText: {
                no: 'Test alt text',
              },
              caption: {
                no: {
                  html: '<p>Test caption</p>',
                },
              },
              topics: [{
                  path: '/test/brun'
                }, {
                  path: '/test/hvit'
                },
              ],
            },
          ],
        },
      ],
      topics: [{
          path: '/test/brun'
        }, {
          path: '/test/hvit'
        },
      ],
    },
  ],
};