Naar de hoofdinhoud
API for Developers: Product Reviews

Only valid for accounts that combine Merchant and Product reviews

Feedback Company avatar
Geschreven door Feedback Company
Meer dan een week geleden bijgewerkt

List

Returns a list of product reviews.

Request

Headers

The "Authorization" header for this API method contains an <access_token> placeholder. Replace it with the value of an actual access token.

Name

Value

Authorization

Bearer <access_token>

URL

Parameters

Name

Allowed values

Required

product_id

(A valid product id, integer)

No

product_external_id

(A valid product external id, string)

No

page

(An integer greater than 0, default: 1)

No

page_size

(An integer between 1 and 1000, default: 25)

No

sort

(A valid sort value, see table below, default: "-created_at")

No

Allowed sort values:

Value

Description

created_at

Sorts on created datetime, ascending.

-created_at

Sorts on created datetime, descending.

score

Sorts on score, ascending.

-score

Sorts on score, descending.

product_name

Sorts on product name, ascending.

-product_name

Sorts on product name, descending.

customer_fullname

Sorts on customer fullname, ascending.

-customer_fullname

Sorts on customer fullname, descending.

Response

Headers

Name

Value

Status code

200

Status message

OK

Example

{
"meta": {
"count": 54
},
"success": true,
"product_reviews": [
{
"weaknesses": [
{
"text": "Doesn't taste as good after refrigerating"
}
],
"product_id": 1234,
"reply": "Dear John, Thanks for your eview. We'll do our best to keep the product quality as high as possible!",
"txt": "These apples are lovely. I will definitely enjoy the rest of them.",
"is_read": true,
"strengths": [

{
"text": "Great taste"
},
{
"text": "Nice color"
}
],
"status": "published",
"created_at": "2018-04-01T00:00:00",
"image_uuid": "d20555ab-ed5d-4d91-af88-227232049069",
"id": 5678,
"replied_at": "2018-04-02T00:00:00",
"customer_id": 9101,
"title": "Lovely apples",
"score": 8,
"invitation_id": 1121
}
]
}

Get

Returns a product review.

Request

Headers

The "Authorization" header for this API method contains an <access_token> placeholder. Replace it with the value of an actual access token.

Name

Value

Authorization

Bearer <access_token>

URL

De "endpoint" voor deze API methode bevat een t <id> plaathouder. Vervang deze met de waarde van de echte product review id.

Response

Headers

Name

Value

Status code

200

Status message

OK

Example

 {
"success": true
"product_review": {
"weaknesses": [
{
"text": "Doesn't taste as good after refrigerating"
}
],
"product_id": 1234,
"reply": "Dear John, Thanks for your rview. We'll do our best to keep the product quality as high as possible!",
"ext": "These apples are lovely. I will definitely enjoy the rest of them.",
"is_read": true,
"strengths": [
{
"text": "Great taste"
},
{
"text": "Nice color"
}
],
"status": "published",
"created_at": "2018-04-01T00:00:00",
"image_uuid": "d20555ab-ed5d-4d91-af88-227232049069",
"id": 5678,
"replied_at": "2018-04-02T00:00:00",
"customer_id": 9101,
"title": "Lovely apples",
"score": 8,
"invitation_id": 1121
}
}

Aggregate

Returns an aggregate of product reviews.

Request

Headers

The "Authorization" header for this API method contains an <access_token> placeholder. Replace it with the value of an actual access token.

Name

Value

Authorization

Bearer <access_token>

URL

Parameters

Name

Allowed values

Required

product_id

(A valid product id, integer)

No

product_external_id

(A valid product external id, string)

No

Response

Headers

Name

Value

Status code

200

Status message

OK

Example

{
"success": true,
"product_review_aggregate": {
"amount_of_reviews": 54,
"score_distribution": [
{
"amount_of_reviews": 1,
"score": 1
},
{
"amount_of_reviews": 2,
"score": 2
},
{
"amount_of_reviews": 1,
"score": 3
},
{
"amount_of_reviews": 6,
"score": 4
},
{
"amount_of_reviews": 2,
"score": 5
},
{
"amount_of_reviews": 10,
"score": 6
},
{
"amount_of_reviews": 5,
"score": 7
},
{
"amount_of_reviews": 8,
"score": 8
},
{
"amount_of_reviews": 5,
"score": 9
},
{
"amount_of_reviews": 14,
"score": 10
}
],
"average_score": 7.148148
}
}
Was dit een antwoord op uw vraag?