# API Importk Skript Storefront zuweisung

**URL:** <https://forum.shopware.com/t/api-importk-skript-storefront-zuweisung/67460>\
**Category:** Programmierung\
**Created:** [5. Juni 2020 um 13:53 UTC](https://forum.shopware.com/t/api-importk-skript-storefront-zuweisung/67460 "2020-06-05T13:53:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![philhager](https://avatars.discourse-cdn.com/v4/letter/p/7ba0ec/32.png) [@philhager](https://forum.shopware.com/u/philhager)\
**Post date:** [5. Juni 2020 um 13:53 UTC](https://forum.shopware.com/t/api-importk-skript-storefront-zuweisung/67460/1 "2020-06-05T13:53:26Z")

</div>

Hallo ich schreibe gerade ein Import Skript mit Node und der Shopware 6 API.

Ich würde gerne beim Shopware Update die jeweilige Storefront (In meinem Fall das Frontend von Shopware)&nbsp;zuweisen.

Im Shopware Admin hab ich den visibilities parameter herausgefunden, jedoch ist mir nicht ganz klar wie ich zu der id komme?

In meinem Beispiel : 605b8bdb457f45a29f3818db258b494b

&nbsp;

Danke für eure Hilfe, hier der Code der Funktion:

&nbsp;

```
 async function updateShopwareArticle(productId,categoryId,manufacturerId,token) {
    
    const axios = require('axios');
    const data = await axios({
        method: 'patch',
            headers: {
              'Authorization': `Bearer ${token}`
            },
            url: 'http://localhost:8888/api/v1/product/'+productId,
            data: {
                categories: [{id:categoryId}],
                manufacturerId: manufacturerId,
                visibilities:[{productId:productId,productVersionId:"0fa91ce3e96a4bc2be4bd9ce752c3425",salesChannelId:"0245dbe7985a4fe7a5e36fcab8044ed9",visibility:30,id:"605b8bdb457f45a29f3818db258b494b"}]
            }
    })
    .catch(error => {
        console.log(error);
    })

}

```

&nbsp;
