Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 4049

Problem to get a product data with sp-amazon for PHp

$
0
0

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


Viewing all articles
Browse latest Browse all 4049

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>