chengkun
2025-09-15 0cc7f61de2b106c9664033fc27d6426d072ea019
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<?php
/**
* This class is autogenerated by the Spapi class generator
* Date of generation: 2022-05-26
* Specification: https://github.com/amzn/selling-partner-api-models/blob/main/models/catalog-items-api-model/catalogItems_2022-04-01.json
* Source MD5 signature: 893c767e8cafcf1612ea529e360a21be
*
*
* Selling Partner API for Catalog Items
* The Selling Partner API for Catalog Items provides programmatic access to information about items in the Amazon catalog.
 
For more information, refer to the [Catalog Items API Use Case Guide](doc:catalog-items-api-v2022-04-01-use-case-guide).
*/
namespace DoubleBreak\Spapi\Api;
use DoubleBreak\Spapi\Client;
 
class CatalogItems extends Client {
 
  /**
  * Operation searchCatalogItems
  *
  * @param array $queryParams
  *    - *identifiers* array - A comma-delimited list of product identifiers to search the Amazon catalog for. **Note:** Cannot be used with `keywords`.
  *    - *identifiersType* string - Type of product identifiers to search the Amazon catalog for. **Note:** Required when `identifiers` are provided.
  *    - *marketplaceIds* array - A comma-delimited list of Amazon marketplace identifiers for the request.
  *    - *includedData* array - A comma-delimited list of data sets to include in the response. Default: `summaries`.
  *    - *locale* string - Locale for retrieving localized summaries. Defaults to the primary locale of the marketplace.
  *    - *sellerId* string - A selling partner identifier, such as a seller account or vendor code. **Note:** Required when `identifiersType` is `SKU`.
  *    - *keywords* array - A comma-delimited list of words to search the Amazon catalog for. **Note:** Cannot be used with `identifiers`.
  *    - *brandNames* array - A comma-delimited list of brand names to limit the search for `keywords`-based queries. **Note:** Cannot be used with `identifiers`.
  *    - *classificationIds* array - A comma-delimited list of classification identifiers to limit the search for `keywords`-based queries. **Note:** Cannot be used with `identifiers`.
  *    - *pageSize* integer - Number of results to be returned per page.
  *    - *pageToken* string - A token to fetch a certain page when there are multiple pages worth of results.
  *    - *keywordsLocale* string - The language of the keywords provided for `keywords`-based queries. Defaults to the primary locale of the marketplace. **Note:** Cannot be used with `identifiers`.
  *
  */
  public function searchCatalogItems($queryParams = [])
  {
    return $this->send("/catalog/2022-04-01/items", [
      'method' => 'GET',
      'query' => $queryParams,
    ]);
  }
 
  public function searchCatalogItemsAsync($queryParams = [])
  {
    return $this->sendAsync("/catalog/2022-04-01/items", [
      'method' => 'GET',
      'query' => $queryParams,
    ]);
  }
 
  /**
  * Operation getCatalogItem
  *
  * @param string $asin The Amazon Standard Identification Number (ASIN) of the item.
  *
  * @param array $queryParams
  *    - *marketplaceIds* array - A comma-delimited list of Amazon marketplace identifiers. Data sets in the response contain data only for the specified marketplaces.
  *    - *includedData* array - A comma-delimited list of data sets to include in the response. Default: `summaries`.
  *    - *locale* string - Locale for retrieving localized summaries. Defaults to the primary locale of the marketplace.
  *
  */
  public function getCatalogItem($asin, $queryParams = [])
  {
    return $this->send("/catalog/2022-04-01/items/{$asin}", [
      'method' => 'GET',
      'query' => $queryParams,
    ]);
  }
 
  public function getCatalogItemAsync($asin, $queryParams = [])
  {
    return $this->sendAsync("/catalog/2022-04-01/items/{$asin}", [
      'method' => 'GET',
      'query' => $queryParams,
    ]);
  }
}