# How to edit/empty custom fields via API

**URL:** <https://forum.shopware.com/t/how-to-edit-empty-custom-fields-via-api/105122>\
**Category:** Shopware Playground - API first Sandbox (EN)\
**Created:** [9. September 2024 um 12:46 UTC](https://forum.shopware.com/t/how-to-edit-empty-custom-fields-via-api/105122 "2024-09-09T12:46:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Flieger\_HH](https://avatars.discourse-cdn.com/v4/letter/f/6f9a4e/32.png) [@Flieger\_HH](https://forum.shopware.com/u/Flieger_HH)\
**Post date:** [9. September 2024 um 12:46 UTC](https://forum.shopware.com/t/how-to-edit-empty-custom-fields-via-api/105122/1 "2024-09-09T12:46:32Z")

</div>

Hi,  
when I remove a custom field set from a product, it’s custom fields’ values stay with the product.  
As that’s not what I want, I try to edit the custom fields first and then remove the custom field set from the product.

By sending e.g. this to the sync API:

{  
„category-CustomField-ProductUpdate“ :  
{  
„action“ : „upsert“,  
„entity“ : „product“,  
„payload“ :  
[

```auto
		{
            "id" : "8fef904cca5f4691b758a4ec2f0d182e",
			    "customFieldName" : "",
                "name" : "Produktname",
			    "price" :
			        [
				        {
					        "currencyId" : "b7d2554b0ce847cd82f3ac9bd1c0dfca",
					        "gross" : 10.95,
					        "linked" : false,
					        "net" : 9.2
				        }
			        ],
			    "productNumber" : "Produktnummer",
			    "stock" : 0,
			    "taxId" : "0c9ef35eed8f46b39a9a0dd22b1d2707"
		    }

    ]
}

```

}

I get that result:

{  
„extensions“: ,  
„data“: {  
„product“: [  
„8fef904cca5f4691b758a4ec2f0d182e“  
],  
„product\_translation“: [  
{  
„productId“: „8fef904cca5f4691b758a4ec2f0d182e“,  
„languageId“: „2fbb5fe2e29a4d70aa5854ce7ce3e20b“  
}  
]  
},  
„notFound“: ,  
„deleted“:  
}

Doesn’t look like an error to me, but the custom field’s content stays unchanged.

What’s my mistake?

thanks, best regards  
Florian Rieger
