chengkun
2025-09-05 4822304b63e1bd6327860af7f3db0133cecf167f
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<?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/listings-items-api-model/listingsItems_2021-08-01.json
* Source MD5 signature: 1c45ce33591f542af4a6dd79aa3b5e61
*
*
* Selling Partner API for Listings Items
* The Selling Partner API for Listings Items (Listings Items API) provides programmatic access to selling partner listings on Amazon. Use this API in collaboration with the Selling Partner API for Product Type Definitions, which you use to retrieve the information about Amazon product types needed to use the Listings Items API.
 
For more information, see the [Listings Items API Use Case Guide](doc:listings-items-api-v2021-08-01-use-case-guide).
*/
namespace DoubleBreak\Spapi\Api;
use DoubleBreak\Spapi\Client;
 
class ListingsItems extends Client {
 
  /**
  * Operation deleteListingsItem
  *
  * @param string $sellerId A selling partner identifier, such as a merchant account or vendor code.
  * @param string $sku A selling partner provided identifier for an Amazon listing.
  *
  * @param array $queryParams
  *    - *marketplaceIds* array - A comma-delimited list of Amazon marketplace identifiers for the request.
  *    - *issueLocale* string - A locale for localization of issues. When not provided, the default language code of the first marketplace is used. Examples: "en_US", "fr_CA", "fr_FR". Localized messages default to "en_US" when a localization is not available in the specified locale.
  *
  */
  public function deleteListingsItem($sellerId, $sku, $queryParams = [])
  {
    return $this->send("/listings/2021-08-01/items/{$sellerId}/{$sku}", [
      'method' => 'DELETE',
      'query' => $queryParams,
    ]);
  }
 
  public function deleteListingsItemAsync($sellerId, $sku, $queryParams = [])
  {
    return $this->sendAsync("/listings/2021-08-01/items/{$sellerId}/{$sku}", [
      'method' => 'DELETE',
      'query' => $queryParams,
    ]);
  }
 
  /**
  * Operation getListingsItem
  *
  * @param string $sellerId A selling partner identifier, such as a merchant account or vendor code.
  * @param string $sku A selling partner provided identifier for an Amazon listing.
  *
  * @param array $queryParams
  *    - *marketplaceIds* array - A comma-delimited list of Amazon marketplace identifiers for the request.
  *    - *issueLocale* string - A locale for localization of issues. When not provided, the default language code of the first marketplace is used. Examples: "en_US", "fr_CA", "fr_FR". Localized messages default to "en_US" when a localization is not available in the specified locale.
  *    - *includedData* array - A comma-delimited list of data sets to include in the response. Default: summaries.
  *
  */
  public function getListingsItem($sellerId, $sku, $queryParams = [])
  {
    return $this->send("/listings/2021-08-01/items/{$sellerId}/{$sku}", [
      'method' => 'GET',
      'query' => $queryParams,
    ]);
  }
 
  public function getListingsItemAsync($sellerId, $sku, $queryParams = [])
  {
    return $this->sendAsync("/listings/2021-08-01/items/{$sellerId}/{$sku}", [
      'method' => 'GET',
      'query' => $queryParams,
    ]);
  }
 
  /**
  * Operation patchListingsItem
  *
  * @param string $sellerId A selling partner identifier, such as a merchant account or vendor code.
  * @param string $sku A selling partner provided identifier for an Amazon listing.
  *
  * @param array $queryParams
  *    - *marketplaceIds* array - A comma-delimited list of Amazon marketplace identifiers for the request.
  *    - *issueLocale* string - A locale for localization of issues. When not provided, the default language code of the first marketplace is used. Examples: "en_US", "fr_CA", "fr_FR". Localized messages default to "en_US" when a localization is not available in the specified locale.
  *
  */
  public function patchListingsItem($sellerId, $sku, $queryParams = [], $body = [])
  {
    return $this->send("/listings/2021-08-01/items/{$sellerId}/{$sku}", [
      'method' => 'PATCH',
      'query' => $queryParams,
      'json' => $body
    ]);
  }
 
  public function patchListingsItemAsync($sellerId, $sku, $queryParams = [], $body = [])
  {
    return $this->sendAsync("/listings/2021-08-01/items/{$sellerId}/{$sku}", [
      'method' => 'PATCH',
      'query' => $queryParams,
      'json' => $body
    ]);
  }
 
  /**
  * Operation putListingsItem
  *
  * @param string $sellerId A selling partner identifier, such as a merchant account or vendor code.
  * @param string $sku A selling partner provided identifier for an Amazon listing.
  *
  * @param array $queryParams
  *    - *marketplaceIds* array - A comma-delimited list of Amazon marketplace identifiers for the request.
  *    - *issueLocale* string - A locale for localization of issues. When not provided, the default language code of the first marketplace is used. Examples: "en_US", "fr_CA", "fr_FR". Localized messages default to "en_US" when a localization is not available in the specified locale.
  *
  */
  public function putListingsItem($sellerId, $sku, $queryParams = [], $body = [])
  {
    return $this->send("/listings/2021-08-01/items/{$sellerId}/{$sku}", [
      'method' => 'PUT',
      'query' => $queryParams,
      'json' => $body
    ]);
  }
 
  public function putListingsItemAsync($sellerId, $sku, $queryParams = [], $body = [])
  {
    return $this->sendAsync("/listings/2021-08-01/items/{$sellerId}/{$sku}", [
      'method' => 'PUT',
      'query' => $queryParams,
      'json' => $body
    ]);
  }
}