Softec
Softec

Reputation: 125

Shopware 6 : Partially update information about a Order Line for multiple custom fields involved

API : /api/order/0xxxxxxxxx3d0d72xxxxxxxxxxxxxxxx

Method : PATCH

{
"lineItems": [
        {
            "id": "xxxxx",
            "orderId": "018ebc3e3d0d72cebc00e7d208fbea6b",
            "identifier": "018e65abd3aa718489a8555f609ac849",
            "customFields": [
                {
                    "amazonMarketIdentifier": "This is Amazon",
                    "eBayMarketIdentifier": "This is eBay",
                    "walmartMarketIdentifier": "This is Walmart",
                }
            ]
        }
    ]
}

Output/Error:

request.CRITICAL: Uncaught PHP Exception TypeError: "Shopware\Core\System\CustomField\CustomFieldService::getCustomField(): 
Argument #1 ($attributeName) must be of type string, int given, 
called in /var/home/shopware_shop/vendor/shopware/core/Framework/DataAbstractionLayer/FieldSerializer/CustomFieldsSerializer.php on line 101" 
at CustomFieldService.php line 38 {"exception":"[object] (TypeError(code: 0):
 
Shopware\\Core\\System\\CustomField\\CustomFieldService::getCustomField(): Argument #1 ($attributeName) must be of type string, int given, 
called in /var/home/shopware/vendor/shopware/core/Framework/DataAbstractionLayer/FieldSerializer/CustomFieldsSerializer.php on line 101 
at /var/home/shopware_shop/vendor/shopware/core/System/CustomField/CustomFieldService.php:38)"} []

Ref. https://shopware.stoplight.io/docs/admin-api/4f7a9d461bde4-partially-update-information-about-a-order-line-item-resource

Upvotes: 0

Views: 48

Answers (0)

Related Questions