Naar de hoofdinhoud
API voor Developers: Product reviews

Let op: call alleen beschikbaar wanneer merchant én product reviews worden verzameld

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

Lijst

Retourneert een lijst met product reviews.

Request

Headers

De "Authorization" header voor de API methode bevat een <access_token> plaathouders. Vervang deze met de waarde van een echte acces 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

Toegestane waarden.

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

Voorbeeld

{
"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 review. We'll do our best to keep the product quality as high as possible!",
"text": "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

Retourneert een product review.

Request

Headers

De "Authorization" header voor deze API methode bevat een <access_token> plaatshouder. Vervang deze met de waarde van de echte acces 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

Voorbeeld

 {
"success": true,
"product_review": {
"weaknesses": [
{
"text": "Doesn't taste as good after refrigerating"
}
],
"product_id": 1234,
"reply": "Dear John, Thanks for your review. We'll do our best to keep the product quality as high as possible!",
"text": "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

Retourneert een verzameling van product reviews.

Request

Headers

De"Authorization" header voor deze API methode bevat een <access_token> plaatshouder. Vervang deze waarde met een echte 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

Voorbeeld

{
"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?