# API Bulk-Upsert gibt Internal Server Error

**URL:** https://forum.shopware.com/t/api-bulk-upsert-gibt-internal-server-error/100593
**Category:** Allgemein
**Tags:** general, programming
**Created:** [21. Juli 2023 um 13:27 UTC](https://forum.shopware.com/t/api-bulk-upsert-gibt-internal-server-error/100593 "2023-07-21T13:27:17Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Genjiro](https://avatars.discourse-cdn.com/v4/letter/g/85e7bf/32.png) [@Genjiro](https://forum.shopware.com/u/Genjiro)
#### Post date: [21. Juli 2023 um 13:27 UTC](https://forum.shopware.com/t/api-bulk-upsert-gibt-internal-server-error/100593/1 "2023-07-21T13:27:18Z")

</div>

Hallo, ich möchte die Preise in der Tabelle `product_price` per API ändern  
Im Prinzip funktioniert das. Nur wenn ich mehrere Produktpreise (ca. 200 - 700) per bulk API call aktualisieren möchte kommt oft ein `500 Internal Server Error` in postman beim Testen.

Die URL, die ich aufrufe ist: `'/api/_action/sync'`.  
Die payload sieht pro Produktpreis so aus:

```auto
{
    "write-product-price": {
        "entity": "product_price",
        "action": "upsert",
        "payload": [
            {
                "id": "355b064d2f4a45878308a1ba2ae9a437",
                "ruleId": "0c7cd6893ba348b2a469d12b64ef3447",
                "productId": "871f8ec7b34b4286bd619ff63cfb082d",
                "price": [
                    {
                        "currencyId": "b7d2554b0ce847cd82f3ac9bd1c0dfca",
                        "net": "67.98",
                        "gross": "80.9",
                        "linked": true,
                        "listPrice": {
                            "currencyId": "b7d2554b0ce847cd82f3ac9bd1c0dfca",
                            "net": "123.45",
                            "gross": "146.90",
                            "linked": true,
                            "listPrice": null,
                            "extensions": [],
                            "regulationPrice": null
                        }
                    }
                ],
                "quantity_start": 1
            },

```

Gibt es eine Möglichkeit anscheinend fehlerhafte Produktpreise zu überspringen oder herauszufinden welche das sind?  
Vielleicht sollte ich das auch nicht als bulk upsert machen.
