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

Bad Request - Unvalid JSON format

fguiliana opened this issue · comments

Hello,

I am currently facing an issue using the PHP Client.
string(121) "Search query parameter should be valid JSON. (see https://api.akeneo.com/php-client/exception.html#bad-request-exception)"
The involved JSON output from the Client is :
{"enabled":[{"operator":"=","value":true}],"completeness":[{"operator":"=","value":100,"scope":"site_web","locale":"fr_FR"}],"rang":[{"operator":"=","value":3,"locale":"fr_FR"}]}

This is the version I am using :
"akeneo/api-php-client": "^6.0",
PIM Version : 3.2.55

I saw in the docs that there could be some incompatibilties so I downgraded the client to 5.0 version.
I'm still facing the same issue.

The exception is caught when I run this line :
$product = $this->client->getProductApi()->all(4, ['search' => $searchFilters, 'scope' => 'site_web']);

Do you have any idea on this one ?
Regards,

Hello @fguiliana,

Sorry for the delay! Since May 2021, we have stopped the PIM 3.2 maintenance.
Could you try with our brand new client version (7.0) and a newer PIM version?

Regards,

The Akeneo development team,

@fguiliana what is the "rang" filter?

Old thread, no answer, closing.
@timonburkard rang is the french for rank