Can residual values be inserted or updated via the Shopware API?

Yes, here is an example call via the Shopware API. The residual value is saved in the "acrisVoucherValue" field. 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"
                        }
                    }
                ]
            }
        ]
    }
]
The 1st UUID (01946eeb49647a7b9403ad92db5b44af) refers to the Shopware promotion (DB table promotion). The 2nd UUID (0195a2dc731570c9a52543efc55a0ae8) refers to the Shopware Individual Code (DB table promotion_individual_code). The 3rd UUID (0195a2e340827136bbde5544ef86b35e) refers to the ACRIS residual value entry (DB table acris_promotion_code_value). The fields "orderId" and "customerId" in the payload are optional. If filled, a connection can be established with the Shopware customer (UUID of the customer) and the Shopware order (UUID of the order).