selling-partner-api icon indicating copy to clipboard operation
selling-partner-api copied to clipboard

Problem with GetCatalogItem

Open MarcoZucc opened this issue 9 months ago • 1 comments

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()); }

Seller Central SP API config page screenshot

AMZON SP API

MarcoZucc avatar May 23 '24 16:05 MarcoZucc