# Adding and updating bulk products with API

**URL:** <https://forum.shopware.com/t/adding-and-updating-bulk-products-with-api/45085>\
**Category:** Programmierung\
**Created:** [7. April 2017 um 13:24 UTC](https://forum.shopware.com/t/adding-and-updating-bulk-products-with-api/45085 "2017-04-07T13:24:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sition](https://avatars.discourse-cdn.com/v4/letter/s/df705f/32.png) [@Sition](https://forum.shopware.com/u/Sition)\
**Post date:** [7. April 2017 um 13:24 UTC](https://forum.shopware.com/t/adding-and-updating-bulk-products-with-api/45085/1 "2017-04-07T13:24:19Z")

</div>

Hi there,

I have 3500+ articles which i need to add / update, preferably with the API.  
I’m encountering issues when adding too many products and I’m wondering if I’m using the correct methods.

**1. updating one product at a time**  
I fetch all products from the source. For each product i’m trying to fetch a product in shopware and use post / put for the single product.

```
$existingArticle = $shopware->get('articles/'.$article['id'].'?useNumberAsId=true');

// post if no article in dbase
if (!$existingArticle) {
    $newArticle = $shopware->post('articles', $article);
    $article_id = $newArticle['data']['id'];
}
// put if article in dbase
else {
    $article_id = $existingArticle['data']['id'];
    $shopware->put('articles/'.$article_id, $article);
}

```

Because I have the id’s of the existing or new products, I can also add the translation of the title, descriptionLong

```
$shopware->put('translations/'.$article_id, $data);

```

**2. updating batch products**  
I put all products in a batch

```
$response= $shopware->put('articles', $aArticles);

```

Now i don’t receive any id’s back so there’s no way to update the translations right?

* * *

Beside the translation issue i encounter performance issues. I’m not even close near the 3500 articles but nothing gets updated (no timeout reached though).

Any help is much appreciated.
