Asking for a friend :p
Hello Akeneo,
I hope you're all going well :)
I have a list of products and product models I'd like to retrieve from Akeneo API. I know only their code/identifier. And I can't get them directly via the GET /api/rest/v1/products
or /api/rest/v1/product-models
endpoints :(
Indeed those endpoints do not allow me to search on identifier
or on code
, which seems to be a base need. I have to use unitary endpoints (`/api/rest/v1/products/{identifier}
) instead, which will increase the load on the server.
Is this enhancement in the roadmap?
FYI, I also opened a ticket here https://github.com/akeneo/api-php-client/issues/188...
Hello Julien,
Currently you can filter by identifier
like this : /api/rest/v1/products?search={"identifier":[{"operator":"IN","value":["1111111171", "13620748"]}]}
same for product-models
_https://api.akeneo.com/documentation/filter.html#filter-on-product-properties_
Ah thanks.
On product models, the identifier property is called "code", not "identifier". So I tried
$productModels = $this->apiClientFactory->getClient()->getProductModelApi()->all(
50,
['search' => ['code' => [['operator' => 'IN', 'value' => $akeneoProductModelIds]]]]
);
which doesn't work. It's a bit missleading.
I think it would be good do explicitly list all the properties in https://api.akeneo.com/documentation/filter.html#filter-on-product-properties.
And same for product models.
Thanks for the help anyway :)
Most helpful comment
I think it would be good do explicitly list all the properties in https://api.akeneo.com/documentation/filter.html#filter-on-product-properties.
And same for product models.
Thanks for the help anyway :)