I am building a small webapp with PHP and jlevers/selling-partner-api (https://github.com/jlevers/selling-partner-api).I need to recover the ASIN starting from EAN code.
I have tried this:
$catalogApi = $connector->catalogItems();try { // EAN code of a product $ean = '3578830113254'; $marketplaceId = 'APJ6JRA9NG5V4'; $includedData = ["summaries", "images", "salesRanks", "productTypes", "identifiers", "variations"]; //search EAN $response = $catalogApi->searchCatalogItems(['marketplaceIds' => [$marketplaceId], 'identifiersType' => 'EAN', 'identifiers' => [$ean], 'includedData' => $includedData ]); // Visualizza la risposta echo "<pre>"; print_r($response); echo "</pre>";} catch (\Exception $e) { // Gestisci gli errori echo "Errore: "; var_dump($e->getMessage());}
but i receive this strange error:
SellingPartnerApi\Seller\CatalogItemsV20220401\Api::getCatalogItem():
Argument #1 ($asin) must be of type string, array given