selling-partner-api
selling-partner-api copied to clipboard
Problem with GetCatalogItem
Problem description:
recive a very strange error when execute a request with GetCatalogItem i don't understand why the script ask to me $asin argument
Error:
SellingPartnerApi\Seller\CatalogItemsV20220401\Api::getCatalogItem(): Argument #1 ($asin) must be of type string, array given
Code
$catalogApi = $connector->catalogItems();
try { // Codice EAN del prodotto da cercare $ean = "3578830113254"; $marketplaceId = "APJ6JRA9NG5V4"; $includedData = ["summaries", "productTypes", "identifiers",];
// search with EAN
$response = $catalogApi->GetCatalogItem(
[$marketplaceId],
[$ean],
"EAN",
$includedData
);
var_dump($response);
} catch (\Exception $e) { // Gestisci gli errori echo "Errore: "; var_dump($e->getMessage()); }