This topic contains 3 replies, has 2 voices, and was last updated by alexandre.pinheiro-da-silva 6 years, 5 months ago.
- Topic
Hello,
i’m using the JSON.API and I try to insert products.
My JSON body looks like this:1234567891011121314151617181920212223242526272829303132333435363738394041424344454647$data = array("data" => array("type" => "products","id" => "999","attributes" => array("sku" => "666EE","status" => "disabled","variantFields" => array(),"productType" => "simple",),"relationships" => array("unitPrecisions" => array("data" => array(array("type" => "productunitprecisions","id" => "100"),array("type" => "productunitprecisions","id" => "65"))),"primaryUnitPrecision" => array("data" => array("type" => "productunitprecisions","id" => "100")),"inventory_status" => array("data" => array("type" => "prodinventorystatuses","id" => "out_of_stock")),"attributeFamily" => array("data" => array("type" => "products","id" => "12","code" => "default")))));And I get this Response:
12345678910111213141516171819202122Result:stdClass Object([errors] => Array([0] => stdClass Object([status] => 400[title] => not blank constraint[detail] => This value should not be blank. Source: attributeFamily.)[1] => stdClass Object([status] => 400[title] => extra fields constraint[detail] => This form should not contain extra fields: "attributeFamily")))Where is the right position to put the attributeFamily?
Anybody can help?
Many thanks in advance.
The forum ‘OroCRM’ is closed to new topics and replies.