akeneo / api-php-client

PHP client of Akeneo PIM API

Home Page:https://packagist.org/packages/akeneo/api-php-client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not able to create product.

mahesh-rajawat opened this issue · comments

I am trying to create a product in akeneo using the below params.

$this->client->getProductApi()->create( 'wk_24_mb01', [ 'enabled' => true, 'family' => 'bag', 'categories' => [], 'groups' => [], 'parent'=> null, 'values' => [ 'product_name' => [ [ 'data' => 'top', 'locale' => 'en_US', 'scope' => null, ] ], 'price' => [ [ 'data' => [ [ 'amount' => '15.5', 'currency' => 'EUR', ], [ 'amount' => '15', 'currency' => 'USD', ], ], 'locale' => null, 'scope' => null, ], ] ] ] );

It returning validation failed error.
Please suggest me.

Thanks

@maheshWebkul721 check that your params key names are correct, I made the stupid assumption they were all standard..