Können Restwerte über die Shopware API eingefügt oder aktualisiert werden?

Ja. Hier ist ein Beispielaufruf über die Shopware API. Der Restwert wird im Feld "acrisVoucherValue" gespeichert. POST api/_action/sync

[
    {
        "action": "upsert",
        "entity": "promotion",
        "payload": [
            {
                "id": "01946eeb49647a7b9403ad92db5b44af",
                "individualCodes": [
                    {
                        "id": "0195a2dc731570c9a52543efc55a0ae8",
                        "code": "1234-ryup",
                        "payload": {
                            "orderId": "43ac798eb693489faadf21f6078c65bc",
                            "customerId": "d8152b80810b436ba20056b29833cf4b",
                            "customerName": "Firstname Lastname"
                        },
                        "acrisVoucherValue": {
                            "id": "0195a2e340827136bbde5544ef86b35e",
                            "value": 7.12,
                            "currencyShortName": "EUR"
                        }
                    }
                ]
            }
        ]
    }
]
Die 1. UUID (01946eeb49647a7b9403ad92db5b44af) bezieht sich auf die Shopware Promotion (DB-Tabelle promotion). Die 2. UUID (0195a2dc731570c9a52543efc55a0ae8) bezieht sich auf den Shopware Individual Code (DB-Tabelle promotion_individual_code). Die 3. UUID (0195a2e340827136bbde5544ef86b35e) bezieht sich auf den ACRIS Restwert Eintrag (DB-Tabelle acris_promotion_code_value). Die Felder „orderId“ und „customerId“ im Payload sind optional. Wenn befüllt, dann lässt sich eine Verbindung mit dem Shopware Kunden (UUID des Kunden) und der Shopware Bestellung (UUID der Bestellung) herstellen.