Hi all we are sending patch request to orocommerce using php curl :
URL : url http://oro.demo/commerce/public/admin/api/products/71
Data as :
{"data":{"type":"products","id":"70","attributes":{"sku":"10305","status":"enabled","variantFields":[],"productType":"simple","featured":true,"newArrival":false},"relationships":{"attributeFamily":{"data":{"type":"attributefamilies","id":"1"}},"inventory_status":{"data":{"type":"prodinventorystatuses","id":"in_stock"}},"names":{"data":[{"type":"localizedfallbackvalues","id":"names-1"}]},"primaryUnitPrecision":{"data":{"type":"productunitprecisions","id":"product-unit-precision-id-3"}}}},"included":[{"type":"productunitprecisions","id":"product-unit-precision-id-3","attributes":{"precision":"7","conversionRate":"5","sell":"0"},"relationships":{"unit":{"data":{"type":"productunits","id":"set"}}}},{"type":"localizedfallbackvalues","id":"names-1","attributes":{"fallback":null,"string":"Fruit Oatmeal","text":null},"relationships":{"localization":{"data":null}}}]}
in Response we are getting result error .
[{"title":"extra fields constraint","detail":"This form should not contain extra fields: "{"data":{"type":"products","id":"70","attributes":{"sku":"10305","status":"enabled","variantFields":"."}]
same data work in sandbox and postman as shown in attachment
My issue resolved by adding Content-Type: application/vnd.api+json.
Thank you all