chengkun
2025-09-09 1ff9e27b020822168a95edd83be567e7153837f3
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<?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/product-pricing-api-model/productPricingV0.json
* Source MD5 signature: c03fed5dfd9cd9e5100d03ccc682be59
*
*
* Selling Partner API for Pricing
* The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer information for Amazon Marketplace products.
*/
namespace DoubleBreak\Spapi\Api;
use DoubleBreak\Spapi\Client;
 
class ProductPricing extends Client {
 
  /**
  * Operation getPricing
  *
  * @param array $queryParams
  *    - *marketplaceId* string - A marketplace identifier. Specifies the marketplace for which prices are returned.
  *    - *asins* array - A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace.
  *    - *skus* array - A list of up to twenty seller SKU values used to identify items in the given marketplace.
  *    - *itemType* string - Indicates whether ASIN values or seller SKU values are used to identify items. If you specify Asin, the information in the response will be dependent on the list of Asins you provide in the Asins parameter. If you specify Sku, the information in the response will be dependent on the list of Skus you provide in the Skus parameter.
  *    - *itemCondition* string - Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.
  *    - *offerType* string - Indicates whether to request pricing information for the seller's B2C or B2B offers. Default is B2C.
  *
  */
  public function getPricing($queryParams = [])
  {
    return $this->send("/products/pricing/v0/price", [
      'method' => 'GET',
      'query' => $queryParams,
    ]);
  }
 
  public function getPricingAsync($queryParams = [])
  {
    return $this->sendAsync("/products/pricing/v0/price", [
      'method' => 'GET',
      'query' => $queryParams,
    ]);
  }
 
  /**
  * Operation getCompetitivePricing
  *
  * @param array $queryParams
  *    - *marketplaceId* string - A marketplace identifier. Specifies the marketplace for which prices are returned.
  *    - *asins* array - A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace.
  *    - *skus* array - A list of up to twenty seller SKU values used to identify items in the given marketplace.
  *    - *itemType* string - Indicates whether ASIN values or seller SKU values are used to identify items. If you specify Asin, the information in the response will be dependent on the list of Asins you provide in the Asins parameter. If you specify Sku, the information in the response will be dependent on the list of Skus you provide in the Skus parameter. Possible values: Asin, Sku.
  *    - *customerType* string - Indicates whether to request pricing information from the point of view of Consumer or Business buyers. Default is Consumer.
  *
  */
  public function getCompetitivePricing($queryParams = [])
  {
    return $this->send("/products/pricing/v0/competitivePrice", [
      'method' => 'GET',
      'query' => $queryParams,
    ]);
  }
 
  public function getCompetitivePricingAsync($queryParams = [])
  {
    return $this->sendAsync("/products/pricing/v0/competitivePrice", [
      'method' => 'GET',
      'query' => $queryParams,
    ]);
  }
 
  /**
  * Operation getListingOffers
  *
  * @param string $sellerSKU Identifies an item in the given marketplace. SellerSKU is qualified by the seller's SellerId, which is included with every operation that you submit.
  *
  * @param array $queryParams
  *    - *marketplaceId* string - A marketplace identifier. Specifies the marketplace for which prices are returned.
  *    - *itemCondition* string - Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.
  *    - *customerType* string - Indicates whether to request Consumer or Business offers. Default is Consumer.
  *
  */
  public function getListingOffers($sellerSKU, $queryParams = [])
  {
    return $this->send("/products/pricing/v0/listings/{$sellerSKU}/offers", [
      'method' => 'GET',
      'query' => $queryParams,
    ]);
  }
 
  public function getListingOffersAsync($sellerSKU, $queryParams = [])
  {
    return $this->sendAsync("/products/pricing/v0/listings/{$sellerSKU}/offers", [
      'method' => 'GET',
      'query' => $queryParams,
    ]);
  }
 
  /**
  * Operation getItemOffers
  *
  * @param string $asin The Amazon Standard Identification Number (ASIN) of the item.
  *
  * @param array $queryParams
  *    - *marketplaceId* string - A marketplace identifier. Specifies the marketplace for which prices are returned.
  *    - *itemCondition* string - Filters the offer listings to be considered based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.
  *    - *customerType* string - Indicates whether to request Consumer or Business offers. Default is Consumer.
  *
  */
  public function getItemOffers($asin, $queryParams = [])
  {
    return $this->send("/products/pricing/v0/items/{$asin}/offers", [
      'method' => 'GET',
      'query' => $queryParams,
    ]);
  }
 
  public function getItemOffersAsync($asin, $queryParams = [])
  {
    return $this->sendAsync("/products/pricing/v0/items/{$asin}/offers", [
      'method' => 'GET',
      'query' => $queryParams,
    ]);
  }
 
  /**
  * Operation getItemOffersBatch
  *
  */
  public function getItemOffersBatch($body = [])
  {
    return $this->send("/batches/products/pricing/v0/itemOffers", [
      'method' => 'POST',
      'json' => $body
    ]);
  }
 
  public function getItemOffersBatchAsync($body = [])
  {
    return $this->sendAsync("/batches/products/pricing/v0/itemOffers", [
      'method' => 'POST',
      'json' => $body
    ]);
  }
 
  /**
  * Operation getListingOffersBatch
  *
  */
  public function getListingOffersBatch($body = [])
  {
    return $this->send("/batches/products/pricing/v0/listingOffers", [
      'method' => 'POST',
      'json' => $body
    ]);
  }
 
  public function getListingOffersBatchAsync($body = [])
  {
    return $this->sendAsync("/batches/products/pricing/v0/listingOffers", [
      'method' => 'POST',
      'json' => $body
    ]);
  }
}