Symptom
When using below POST request, the localized name attribute existing value is not set to null as per inbound payload, i.e. existing value can't be removed/emptied.
POST - https://localhost:9002/odata2webservices/InboundProduct/Products
Body
|
{
"integrationKey": "TEST_KEY",
"code": "test1234",
"catalogVersion": {
"integrationKey": "TEST_KEY",
"version": "Staged",
"catalog": {
"integrationKey": "TEST_KEY",
"id": "Default"
}
},
"unit": {
"integrationKey": "TEST_KEY",
"code": "pieces"
},
"localizedAttributes": [
{
"language": "en",
"name": null
}
]
}
|
Response:
|
<?xml version='1.0' encoding='utf-8'?>
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xml:base="https://localhost:9002/odata2webservices/InboundProduct/">
<id>https://localhost:9002/odata2webservices/InboundProduct/Products('Staged%7CDefault%7Ctest1234')</id>
<title type="text">Products</title>
<updated>2023-08-03T07:21:27.326Z</updated>
<category term="HybrisCommerceOData.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
<link href="Products('Staged%7CDefault%7Ctest1234')" rel="edit" title="Product"/>
<link href="Products('Staged%7CDefault%7Ctest1234')/catalogVersion" rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/catalogVersion" title="catalogVersion" type="application/atom+xml;type=entry"/>
<link href="Products('Staged%7CDefault%7Ctest1234')/unit" rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/unit" title="unit" type="application/atom+xml;type=entry"/>
<link href="Products('Staged%7CDefault%7Ctest1234')/localizedAttributes" rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/localizedAttributes" title="localizedAttributes" type="application/atom+xml;type=feed"/>
<content type="application/xml">
<m:properties>
<d:name>en_test</d:name>
<d:code>test1234</d:code>
<d:integrationKey>Staged|Default|test1234</d:integrationKey>
</m:properties>
</content>
</entry>
|
***Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.***
Read more...
Environment
SAP Commerce Cloud
Product
SAP Commerce Cloud 2105 ; SAP Commerce Cloud 2205 ; SAP Commerce Cloud 2211
Keywords
empty value, remove attribute value, clear value , KBA , CEC-SCC-INT-IAPI , Integration APIs , Problem
About this page
This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).Search for additional results
Visit SAP Support Portal's SAP Notes and KBA Search.
SAP Knowledge Base Article - Preview