@plentymarkets/shop-api / getFeedbackAverage
Function: getFeedbackAverage() ​
getFeedbackAverage(
context
,params
):Promise
<Data
<ReviewAverage
>>
Method getFeedbackAverage - Used to get the review feedback average.
Parameters ​
• context: PlentysystemsIntegrationContext
• params: FeedbackAverageParams
allowFeedbacksOnlyIfPurchased: allows feedback count only if purchased. numberOfFeedbacks: the number of feedback items to be taken into consideration. itemIds: id's of the items.
Returns ​
Promise
<Data
<ReviewAverage
>>
Result represents counts of average feedback.
Remarks ​
- Calls /rest/feedbacks/feedback/helper/counts/$
- Method should be used to get the average feedback for reviews.
Example ​
ts
const { data } = await useSdk().plentysystems.getFeedbackAverage({
allowFeedbacksOnlyIfPurchased: false,
numberOfFeedbacks: 100,
itemIds: ['1100']
});