Skip to content

Commit 8ec2b88

Browse files
committed
Add Customer Feedback API
1 parent 92ec43d commit 8ec2b88

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+12588
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,10 @@ $sellerConnector = SellingPartnerApi::seller(/* ... */);
251251
```php
252252
$catalogItemsApi = $sellerConnector->catalogItemsV0();
253253
```
254+
* **Customer Feedback API (v2024-06-01)** ([docs](https://developer-docs.amazon.com/sp-api/docs/customer-feedback-api-v2024-06-01-reference))
255+
```php
256+
$customerFeedbackApi = $sellerConnector->customerFeedbackV20240601();
257+
```
254258
* **Data Kiosk API (v2023-11-15)** ([docs](https://developer-docs.amazon.com/sp-api/v0/docs/data-kiosk-api-v2023-11-15-reference))
255259
```php
256260
$dataKioskApi = $sellerConnector->dataKioskV20231115();

resources/apis.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,15 @@
5353
}
5454
]
5555
},
56+
"customer-feedback": {
57+
"name": "Customer Feedback",
58+
"versions": [
59+
{
60+
"version": "2024-06-01",
61+
"url": "https://raw.githubusercontent.com/amzn/selling-partner-api-models/refs/heads/main/models/customer-feedback-api-model/customerFeedback_2024-06-01.json"
62+
}
63+
]
64+
},
5665
"data-kiosk": {
5766
"name": "Data Kiosk",
5867
"versions": [

resources/models/raw/seller/customer-feedback/v2024-06-01.json

Lines changed: 5479 additions & 0 deletions
Large diffs are not rendered by default.

resources/models/seller/customer-feedback/v2024-06-01.json

Lines changed: 5479 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
<?php
2+
3+
namespace SellingPartnerApi\Seller\CustomerFeedbackV20240601;
4+
5+
use Saloon\Http\Response;
6+
use SellingPartnerApi\BaseResource;
7+
use SellingPartnerApi\Seller\CustomerFeedbackV20240601\Requests\GetBrowseNodeReturnTopics;
8+
use SellingPartnerApi\Seller\CustomerFeedbackV20240601\Requests\GetBrowseNodeReturnTrends;
9+
use SellingPartnerApi\Seller\CustomerFeedbackV20240601\Requests\GetBrowseNodeReviewTopics;
10+
use SellingPartnerApi\Seller\CustomerFeedbackV20240601\Requests\GetBrowseNodeReviewTrends;
11+
use SellingPartnerApi\Seller\CustomerFeedbackV20240601\Requests\GetItemBrowseNode;
12+
use SellingPartnerApi\Seller\CustomerFeedbackV20240601\Requests\GetItemReviewTopics;
13+
use SellingPartnerApi\Seller\CustomerFeedbackV20240601\Requests\GetItemReviewTrends;
14+
15+
class Api extends BaseResource
16+
{
17+
/**
18+
* @param string $asin The Amazon Standard Identification Number (ASIN) is the unique identifier of a product within a marketplace. The value must be a child ASIN.
19+
* @param string $marketplaceId The MarketplaceId is the globally unique identifier of a marketplace, you can refer to the marketplaceId here : https://developer-docs.amazon.com/sp-api/docs/marketplace-ids.
20+
* @param string $sortBy The metric by which to sort data in the response.
21+
*/
22+
public function getItemReviewTopics(string $asin, string $marketplaceId, string $sortBy): Response
23+
{
24+
$request = new GetItemReviewTopics($asin, $marketplaceId, $sortBy);
25+
26+
return $this->connector->send($request);
27+
}
28+
29+
/**
30+
* @param string $asin The Amazon Standard Identification Number (ASIN) is the unique identifier of a product within a marketplace.
31+
* @param string $marketplaceId The MarketplaceId is the globally unique identifier of a marketplace, you can refer to the marketplaceId here : https://developer-docs.amazon.com/sp-api/docs/marketplace-ids.
32+
*/
33+
public function getItemBrowseNode(string $asin, string $marketplaceId): Response
34+
{
35+
$request = new GetItemBrowseNode($asin, $marketplaceId);
36+
37+
return $this->connector->send($request);
38+
}
39+
40+
/**
41+
* @param string $browseNodeId The ID of a browse node. A browse node is a named location in a browse tree that is used for navigation, product classification, and website content.
42+
* @param string $marketplaceId The MarketplaceId is the globally unique identifier of a marketplace, you can refer to the marketplaceId here : https://developer-docs.amazon.com/sp-api/docs/marketplace-ids.
43+
* @param string $sortBy The metric by which to sort the data in the response.
44+
*/
45+
public function getBrowseNodeReviewTopics(string $browseNodeId, string $marketplaceId, string $sortBy): Response
46+
{
47+
$request = new GetBrowseNodeReviewTopics($browseNodeId, $marketplaceId, $sortBy);
48+
49+
return $this->connector->send($request);
50+
}
51+
52+
/**
53+
* @param string $asin The Amazon Standard Identification Number (ASIN) is the unique identifier of a product within a marketplace. This API takes child ASIN as an input.
54+
* @param string $marketplaceId The MarketplaceId is the globally unique identifier of a marketplace, you can refer to the marketplaceId here : https://developer-docs.amazon.com/sp-api/docs/marketplace-ids.
55+
*/
56+
public function getItemReviewTrends(string $asin, string $marketplaceId): Response
57+
{
58+
$request = new GetItemReviewTrends($asin, $marketplaceId);
59+
60+
return $this->connector->send($request);
61+
}
62+
63+
/**
64+
* @param string $browseNodeId A browse node ID is a unique identifier of a browse node. A browse node is a named location in a browse tree that is used for navigation, product classification, and website content.
65+
* @param string $marketplaceId The marketplace ID is the globally unique identifier of a marketplace. For more information, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
66+
*/
67+
public function getBrowseNodeReviewTrends(string $browseNodeId, string $marketplaceId): Response
68+
{
69+
$request = new GetBrowseNodeReviewTrends($browseNodeId, $marketplaceId);
70+
71+
return $this->connector->send($request);
72+
}
73+
74+
/**
75+
* @param string $browseNodeId A browse node ID is a unique identifier for a browse node. A browse node is a named location in a browse tree that is used for navigation, product classification, and website content.
76+
* @param string $marketplaceId The MarketplaceId is the globally unique identifier of a marketplace, you can refer to the marketplaceId here : https://developer-docs.amazon.com/sp-api/docs/marketplace-ids.
77+
*/
78+
public function getBrowseNodeReturnTopics(string $browseNodeId, string $marketplaceId): Response
79+
{
80+
$request = new GetBrowseNodeReturnTopics($browseNodeId, $marketplaceId);
81+
82+
return $this->connector->send($request);
83+
}
84+
85+
/**
86+
* @param string $browseNodeId A browse node ID is a unique identifier of a browse node. A browse node is a named location in a browse tree that is used for navigation, product classification, and website content.
87+
* @param string $marketplaceId The MarketplaceId is the globally unique identifier of a marketplace, you can refer to the marketplaceId here : https://developer-docs.amazon.com/sp-api/docs/marketplace-ids.
88+
*/
89+
public function getBrowseNodeReturnTrends(string $browseNodeId, string $marketplaceId): Response
90+
{
91+
$request = new GetBrowseNodeReturnTrends($browseNodeId, $marketplaceId);
92+
93+
return $this->connector->send($request);
94+
}
95+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
3+
/**
4+
* This file is auto-generated by Saloon SDK Generator
5+
* Generator: Crescat\SaloonSdkGenerator\Generators\DtoGenerator
6+
* Do not modify it directly.
7+
*/
8+
9+
declare(strict_types=1);
10+
11+
namespace SellingPartnerApi\Seller\CustomerFeedbackV20240601\Dto;
12+
13+
use SellingPartnerApi\Dto;
14+
15+
final class BrowseNodeAllOccurrence extends Dto
16+
{
17+
/**
18+
* @param float $topTwentyFivePercentProducts The percentage of reviews of the top 25 percent of products in the browse node that mention the topic.
19+
* @param float $allProducts The percentage of reviews of products in the browse node that mention the topic.
20+
*/
21+
public function __construct(
22+
public float $topTwentyFivePercentProducts,
23+
public float $allProducts,
24+
) {}
25+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
3+
/**
4+
* This file is auto-generated by Saloon SDK Generator
5+
* Generator: Crescat\SaloonSdkGenerator\Generators\DtoGenerator
6+
* Do not modify it directly.
7+
*/
8+
9+
declare(strict_types=1);
10+
11+
namespace SellingPartnerApi\Seller\CustomerFeedbackV20240601\Dto;
12+
13+
use SellingPartnerApi\Dto;
14+
15+
final class BrowseNodeAllStarRatingImpact extends Dto
16+
{
17+
/**
18+
* @param float $topTwentyFivePercentProducts The effect of the topic on the star rating of the top 25 percent of products in the browse node. This value can be positive or negative.
19+
* @param float $allProducts The effect of the topic on the star rating of all products in the browse node. This value can be positive or negative.
20+
*/
21+
public function __construct(
22+
public float $topTwentyFivePercentProducts,
23+
public float $allProducts,
24+
) {}
25+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
3+
/**
4+
* This file is auto-generated by Saloon SDK Generator
5+
* Generator: Crescat\SaloonSdkGenerator\Generators\DtoGenerator
6+
* Do not modify it directly.
7+
*/
8+
9+
declare(strict_types=1);
10+
11+
namespace SellingPartnerApi\Seller\CustomerFeedbackV20240601\Dto;
12+
13+
use SellingPartnerApi\Dto;
14+
15+
final class BrowseNodeOccurrence extends Dto
16+
{
17+
/**
18+
* @param float $allProducts The percentage of reviews of products in the browse node that mention a topic.
19+
*/
20+
public function __construct(
21+
public float $allProducts,
22+
) {}
23+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
3+
/**
4+
* This file is auto-generated by Saloon SDK Generator
5+
* Generator: Crescat\SaloonSdkGenerator\Generators\DtoGenerator
6+
* Do not modify it directly.
7+
*/
8+
9+
declare(strict_types=1);
10+
11+
namespace SellingPartnerApi\Seller\CustomerFeedbackV20240601\Dto;
12+
13+
use SellingPartnerApi\Dto;
14+
15+
final class BrowseNodeReturnTopics extends Dto
16+
{
17+
/**
18+
* @param string $topic The name of the return feedback topic .
19+
* @param BrowseNodeTrendMetrics $browseNodeMetrics A single browse node review or return trend metric.
20+
*/
21+
public function __construct(
22+
public string $topic,
23+
public BrowseNodeTrendMetrics $browseNodeMetrics,
24+
) {}
25+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php
2+
3+
/**
4+
* This file is auto-generated by Saloon SDK Generator
5+
* Generator: Crescat\SaloonSdkGenerator\Generators\DtoGenerator
6+
* Do not modify it directly.
7+
*/
8+
9+
declare(strict_types=1);
10+
11+
namespace SellingPartnerApi\Seller\CustomerFeedbackV20240601\Dto;
12+
13+
use SellingPartnerApi\Dto;
14+
15+
final class BrowseNodeReturnTrend extends Dto
16+
{
17+
protected static array $complexArrayTypes = ['trendMetrics' => BrowseNodeReturnTrendPoint::class];
18+
19+
/**
20+
* @param string $topic The name of the topic.
21+
* @param BrowseNodeReturnTrendPoint[] $trendMetrics The browse node return trend metrics.
22+
*/
23+
public function __construct(
24+
public string $topic,
25+
public array $trendMetrics,
26+
) {}
27+
}

0 commit comments

Comments
 (0)