Reviews

All reviews endpoints have path prefix /reviews-service.

User's API

Create Document

Endpoint for create new document based on scan_id.

Team members of the product owner participant will receive notification emails when new reviews are added for the product. Notifications will be sent only if team member users have notifications_recipient role from the product owner participant.

POST /reviews-service/review_doc
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
scan_id string Required: Scan Id
rate number Required: User rate
text string Required: Text description
images array::object List of image objects e.g. [{url: "someurl"}]
Example Response
{
    "fb": "864230000000000000000",
    "id": "urn:authenticateit:review_doc:251846800175067",
    "linkedin": null,
    "status": "Thank you! We are processing information you provided. You will be granted coins once we approve it.",
    "status_i18n_id": "reviews-add_review-success",
    "twitter": null,
    "url": "https://reviews.shping.com/251846800175067"
}

Review actions

Endpoint provide to take some actions with the review for mobile user.

PUT /reviews-service/review_doc/:id/action
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
id string Required: Review ID
report string Text report
state string Current user review state (enum "like","dislike","none")
action string Next user review state (enum "like","dislike","none")
hide string Hide reviews option (enum "product", "owner", "all")
Example Request
{
    "report": "Report Text",
    "state": "none",
    "action": "dislike",
    "hide": "product"
}
Example Response (if hide opt was set)
{
    "hide_all": false,
    "owners": [
        {
            "first_name": "Ethertest3",
            "id": "urn:authenticateit:user:email:ethertest3@mailinator.com",
            "last_name": "Ethertest3",
            "photo": "https://photo_url"
        }
    ],
    "products": [
        {
            "id": "00498765432233",
            "name": "Test"
        }
    ]
}

Get current settings

GET /reviews-service/settings
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
Example Response
{
    "hide_all": false,
    "owners": [
        {
            "first_name": "Ethertest3",
            "id": "urn:authenticateit:user:email:ethertest3@mailinator.com",
            "last_name": "Ethertest3",
            "photo": "https://photo_url"
        }
    ],
    "products": [
        {
            "id": "00498765432233",
            "name": "Test"
        }
    ]
}

Update settings

PUT /reviews-service/settings
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
hide_all boolean hide_all option
owners list List of values which must be filtered
products list List of values which must be filtered
Example Request
{
    "hide_all": false,
    "owners": ["urn:authenticateit:user:email:ethertest3@mailinator.com"],
    "products": ["00498765432998"]
}
Example Response
{
    "hide_all": false,
    "owners": [],
    "products": []
}

Read Documents

Endpoint for users to read approved documents. Filtering documents based on scan fields “country” and “language”.

Review documents are split into chunks. The response has id (current chunk identifier) and next (identifier of the next chunk of review documents, will be null if there are no more chunks) chunk related fields. Use id parameter (in the query string for GET method or in the request body for POST method) to request a particular review documents chunk.

GET /reviews-service/review_docs/:scan_id
POST /reviews-service/review_docs/:scan_id
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
scan_id url Required: Scan Id
id string Chunk identifier
include_product_score boolean Include product score
include_location boolean Include postcode location
Example Response. include_product_score=true&include_location=true
{
    "id": "1",
    "next": null,
    "product_score": {
        "product_reviews_rate": 4.0,
        "rates": [
            {
                "count": 1,
                "star": 0
            },
            {
                "count": 0,
                "star": 1
            },
            {
                "count": 0,
                "star": 2
            },
            {
                "count": 0,
                "star": 3
            },
            {
                "count": 1,
                "star": 4
            },
            {
                "count": 0,
                "star": 5
            }
        ],
        "total_reviews": 2
    },
    "reviews": [
        {
            "comments": [],
            "counters": {
                "dislikes": 1,
                "likes": 0
            },
            "country": "036",
            "first_name": "hhhhhhhasd",
            "id": "urn:authenticateit:review_doc:181355628756230",
            "images": [
                {
                    "url": "https://dev-cdn.shping.com/2022/11/21/107ac0f8-556b-4e13-a2db-efca7e8abd9e"
                }
            ],
            "images_orig": [
                {
                    "url": "https://dev-cdn.shping.com/2022/11/21/107ac0f8-556b-4e13-a2db-efca7e8abd9e"
                }
            ],
            "last_name": "",
            "level_icon": "https://cdn.shping.com/2017/11/22/2f98de94-73bf-4b40-9490-e4a8a714264c.png",
            "post_code": "30000",
            "product": {
                "counters": {
                    "user_reviews": 1,
                    "user_reviews_rate": 4.0,
                    "user_scans": 9
                },
                "id": "04499988844441",
                "name": "444444444444"
            },
            "rate": 4,
            "reviews_karma": 0,
            "rich_data": [
                {
                    "id": "304079c1-c585-4d5f-a4f4-e9b533e20266",
                    "text": "More details.",
                    "title": "Some Text",
                    "type": "text"
                },
                {
                    "id": "1358b7b9-81e0-43ae-90ba-7c274156c908",
                    "required": true,
                    "text": "Hhh",
                    "title": "How we was? (req)",
                    "type": "textbox"
                },
                {
                    "id": "f95916d7-fb5c-41c3-83cb-6fa01c64fb9f",
                    "required": false,
                    "text": "Bbb",
                    "title": "What about store location? (not_req)",
                    "type": "textbox"
                },
                {
                    "id": "fc89b758-5150-4007-b3c0-f33f2936e57d",
                    "rating": 4,
                    "required": true,
                    "title": "Rate this product (req)",
                    "type": "rating"
                },
                {
                    "id": "56102711-f0a3-45d8-8d78-aef9d11772b1",
                    "rating": 2,
                    "required": false,
                    "title": "Rate the pack (not_req)",
                    "type": "rating"
                },
                {
                    "id": "6040c94f-b108-40a1-af25-669cf9f08124",
                    "rating": 5,
                    "required": false,
                    "title": "Rate the stuff (not_req)",
                    "type": "rating"
                },
                {
                    "answer_index": 1,
                    "answers": [
                        {
                            "answer": "A"
                        },
                        {
                            "answer": "B"
                        },
                        {
                            "answer": "C"
                        }
                    ],
                    "choice": "single",
                    "id": "35e6938f-d3ae-4e36-a34c-957c43ad91a1",
                    "question": "Choose one item",
                    "required": false,
                    "title": "Question 1 (not_req)",
                    "type": "question"
                },
                {
                    "answer_index": [
                        1
                    ],
                    "answers": [
                        {
                            "answer": "A"
                        },
                        {
                            "answer": "B"
                        },
                        {
                            "answer": "C"
                        }
                    ],
                    "choice": "multiple",
                    "id": "a3d6c2a8-88f7-4506-8d4b-e84b4b781774",
                    "question": "Choose one or more items",
                    "required": true,
                    "title": "Question 2 (req)",
                    "type": "question"
                },
                {
                    "id": "bf221df3-9b22-4559-a784-1314ebd88a74",
                    "required": true,
                    "title": "Upload the photo  (req)",
                    "type": "image",
                    "url": "https://dev-cdn.shping.com/2022/11/21/107ac0f8-556b-4e13-a2db-efca7e8abd9e",
                    "url_orig": "https://dev-cdn.shping.com/2022/11/21/107ac0f8-556b-4e13-a2db-efca7e8abd9e"
                },
                {
                    "height": 480,
                    "id": "35848e65-0de4-4650-b040-8d2b3da3ce11",
                    "preview": "https://dev-cdn.shping.com/2022/11/21/2e7a9f6c-0eac-4284-8758-5b1a231af0b2",
                    "required": true,
                    "title": "Upload video review of the product (req)",
                    "type": "video",
                    "url": "https://dev-cdn.shping.com/2022/11/21/9c218f17-7095-4913-aef4-210a493a6bc7.mov",
                    "width": 360
                },
                {
                    "id": "1f080843-e898-4d19-9bbc-ff9a29aaa9bf",
                    "text": "See you!",
                    "title": "The end",
                    "type": "text"
                }
            ],
            "scan_id": "e93555bf-9b9a-4f79-8ad3-0efdf29f5df5",
            "source": "tmb",
            "source_icon": "https://cdn.shping.com/2018/1/28/a759926f-0826-4d90-9d62-61aa4d202d56.png",
            "tags": [],
            "text": "How we was? (req)\nHhh\n\nWhat about store location? (not_req)\nBbb\n\nQuestion 1 (not_req)\nChoose one item\nB\n\nQuestion 2 (req)\nChoose one or more items\nB",
            "ts": "2022-11-21T04:06:53Z",
            "user_age": 40,
            "user_icon": "https://dev-cdn.shping.com/2022/5/12/6479b6e9-1f39-4e4d-8dd0-f09f7ebe57e6",
            "user_id": "urn:authenticateit:user:email:ikleeen+103@gmail.com",
            "user_like_option": "dislike",
            "user_locality": null,
            "user_state": null,
            "user_state_name": null,
            "videos": [
                {
                    "height": 480,
                    "preview": "https://dev-cdn.shping.com/2022/11/21/2e7a9f6c-0eac-4284-8758-5b1a231af0b2",
                    "url": "https://dev-cdn.shping.com/2022/11/21/9c218f17-7095-4913-aef4-210a493a6bc7.mov",
                    "width": 360
                }
            ]
        },
        {
            "comments": [
                {
                    "id": "a0726eec-1e8b-4110-9c4e-04ed1331fef1",
                    "participant_id": "urn:authenticateit:participant:1",
                    "participant_logo": "https://dev-cdn.shping.com/2022/11/9/26775146-4028-426d-8874-f6f8d3e39e57.png",
                    "participant_name": "Authenticateit Pty Ltd",
                    "text": "Hello !!!!",
                    "ts": "2022-11-21T01:13:57Z",
                    "user_id": "urn:authenticateit:user:email:system@authenticateit.com"
                }
            ],
            "counters": {
                "dislikes": 0,
                "likes": 1
            },
            "country": "036",
            "first_name": "First 5",
            "id": "urn:authenticateit:review_doc:997959703086763",
            "images": [
                {
                    "url": "https://learnopencv.com/wp-content/uploads/2021/04/image-15.png"
                }
            ],
            "images_orig": [
                {
                    "url": "https://learnopencv.com/wp-content/uploads/2021/04/image-15.png"
                }
            ],
            "last_name": "Last 5",
            "level_icon": "https://cdn.shping.com/2017/11/22/d19659ca-2fe0-41c4-bafe-f4b54a67cf61.png",
            "post_code": "3004",
            "product": {
                "counters": {
                    "user_reviews": 1,
                    "user_reviews_rate": 4.0,
                    "user_scans": 9
                },
                "id": "04499988844441",
                "name": "444444444444"
            },
            "reviews_karma": 2,
            "rich_data": [
                {
                    "coin_weight": 0.19672,
                    "id": "ed8690cf-ec6e-4578-bb1a-1466c79e8ddd",
                    "required": true,
                    "title": "assdaas",
                    "type": "image",
                    "url": "https://learnopencv.com/wp-content/uploads/2021/04/image-15.png",
                    "url_orig": "https://learnopencv.com/wp-content/uploads/2021/04/image-15.png"
                },
                {
                    "coin_weight": 0.65574,
                    "height": 1280,
                    "id": "044f298b-b84d-41d3-92c1-f54744df3fa2",
                    "preview": "https://dev-cdn.shping.com/2022/11/18/2b46a749-4be9-4ca9-8fb3-014f053db4b1",
                    "title": "Upload video ",
                    "type": "video",
                    "url": "https://dev-cdn.shping.com/2022/11/18/f6e104d9-5cab-4653-9973-6540b705421c.mp4",
                    "width": 720
                }
            ],
            "scan_id": "56a26149-7978-4b28-bfc3-c06b3687874d",
            "source": "tmb",
            "source_icon": "https://cdn.shping.com/2018/1/28/a759926f-0826-4d90-9d62-61aa4d202d56.png",
            "tags": [],
            "ts": "2022-11-18T00:00:45Z",
            "user_age": 52,
            "user_icon": "https://dev-cdn.shping.com/2022/11/9/0581b6f9-79a1-4096-9611-bb88ad31f6af",
            "user_id": "urn:authenticateit:user:email:shping:9cf92a52-e708-4d45-a7f5-53ed475c1c3c",
            "user_like_option": "like",
            "user_locality": "MELBOURNE",
            "user_state": "VIC",
            "user_state_name": "Victoria",
            "videos": [
                {
                    "height": 1280,
                    "preview": "https://dev-cdn.shping.com/2022/11/18/2b46a749-4be9-4ca9-8fb3-014f053db4b1",
                    "url": "https://dev-cdn.shping.com/2022/11/18/f6e104d9-5cab-4653-9973-6540b705421c.mp4",
                    "width": 720
                }
            ]
        }
    ]
}
Example Response. include_product_score=false&include_location=false
{
    "id": "1",
    "next": null,
    "reviews": [
        {
            "comments": [],
            "counters": {
                "dislikes": 1,
                "likes": 0
            },
            "country": "036",
            "first_name": "hhhhhhhasd",
            "id": "urn:authenticateit:review_doc:181355628756230",
            "images": [
                {
                    "url": "https://dev-cdn.shping.com/2022/11/21/107ac0f8-556b-4e13-a2db-efca7e8abd9e"
                }
            ],
            "images_orig": [
                {
                    "url": "https://dev-cdn.shping.com/2022/11/21/107ac0f8-556b-4e13-a2db-efca7e8abd9e"
                }
            ],
            "last_name": "",
            "level_icon": "https://cdn.shping.com/2017/11/22/2f98de94-73bf-4b40-9490-e4a8a714264c.png",
            "post_code": "30000",
            "product": {
                "counters": {
                    "user_reviews": 1,
                    "user_reviews_rate": 4.0,
                    "user_scans": 9
                },
                "id": "04499988844441",
                "name": "444444444444"
            },
            "rate": 4,
            "reviews_karma": 0,
            "rich_data": [
                {
                    "id": "304079c1-c585-4d5f-a4f4-e9b533e20266",
                    "text": "More details.",
                    "title": "Some Text",
                    "type": "text"
                },
                {
                    "id": "1358b7b9-81e0-43ae-90ba-7c274156c908",
                    "required": true,
                    "text": "Hhh",
                    "title": "How we was? (req)",
                    "type": "textbox"
                },
                {
                    "id": "f95916d7-fb5c-41c3-83cb-6fa01c64fb9f",
                    "required": false,
                    "text": "Bbb",
                    "title": "What about store location? (not_req)",
                    "type": "textbox"
                },
                {
                    "id": "fc89b758-5150-4007-b3c0-f33f2936e57d",
                    "rating": 4,
                    "required": true,
                    "title": "Rate this product (req)",
                    "type": "rating"
                },
                {
                    "id": "56102711-f0a3-45d8-8d78-aef9d11772b1",
                    "rating": 2,
                    "required": false,
                    "title": "Rate the pack (not_req)",
                    "type": "rating"
                },
                {
                    "id": "6040c94f-b108-40a1-af25-669cf9f08124",
                    "rating": 5,
                    "required": false,
                    "title": "Rate the stuff (not_req)",
                    "type": "rating"
                },
                {
                    "answer_index": 1,
                    "answers": [
                        {
                            "answer": "A"
                        },
                        {
                            "answer": "B"
                        },
                        {
                            "answer": "C"
                        }
                    ],
                    "choice": "single",
                    "id": "35e6938f-d3ae-4e36-a34c-957c43ad91a1",
                    "question": "Choose one item",
                    "required": false,
                    "title": "Question 1 (not_req)",
                    "type": "question"
                },
                {
                    "answer_index": [
                        1
                    ],
                    "answers": [
                        {
                            "answer": "A"
                        },
                        {
                            "answer": "B"
                        },
                        {
                            "answer": "C"
                        }
                    ],
                    "choice": "multiple",
                    "id": "a3d6c2a8-88f7-4506-8d4b-e84b4b781774",
                    "question": "Choose one or more items",
                    "required": true,
                    "title": "Question 2 (req)",
                    "type": "question"
                },
                {
                    "id": "bf221df3-9b22-4559-a784-1314ebd88a74",
                    "required": true,
                    "title": "Upload the photo  (req)",
                    "type": "image",
                    "url": "https://dev-cdn.shping.com/2022/11/21/107ac0f8-556b-4e13-a2db-efca7e8abd9e",
                    "url_orig": "https://dev-cdn.shping.com/2022/11/21/107ac0f8-556b-4e13-a2db-efca7e8abd9e"
                },
                {
                    "height": 480,
                    "id": "35848e65-0de4-4650-b040-8d2b3da3ce11",
                    "preview": "https://dev-cdn.shping.com/2022/11/21/2e7a9f6c-0eac-4284-8758-5b1a231af0b2",
                    "required": true,
                    "title": "Upload video review of the product (req)",
                    "type": "video",
                    "url": "https://dev-cdn.shping.com/2022/11/21/9c218f17-7095-4913-aef4-210a493a6bc7.mov",
                    "width": 360
                },
                {
                    "id": "1f080843-e898-4d19-9bbc-ff9a29aaa9bf",
                    "text": "See you!",
                    "title": "The end",
                    "type": "text"
                }
            ],
            "scan_id": "e93555bf-9b9a-4f79-8ad3-0efdf29f5df5",
            "source": "tmb",
            "source_icon": "https://cdn.shping.com/2018/1/28/a759926f-0826-4d90-9d62-61aa4d202d56.png",
            "tags": [],
            "text": "How we was? (req)\nHhh\n\nWhat about store location? (not_req)\nBbb\n\nQuestion 1 (not_req)\nChoose one item\nB\n\nQuestion 2 (req)\nChoose one or more items\nB",
            "ts": "2022-11-21T04:06:53Z",
            "user_age": 40,
            "user_icon": "https://dev-cdn.shping.com/2022/5/12/6479b6e9-1f39-4e4d-8dd0-f09f7ebe57e6",
            "user_id": "urn:authenticateit:user:email:ikleeen+103@gmail.com",
            "user_like_option": "dislike",
            "videos": [
                {
                    "height": 480,
                    "preview": "https://dev-cdn.shping.com/2022/11/21/2e7a9f6c-0eac-4284-8758-5b1a231af0b2",
                    "url": "https://dev-cdn.shping.com/2022/11/21/9c218f17-7095-4913-aef4-210a493a6bc7.mov",
                    "width": 360
                }
            ]
        },
        {
            "comments": [
                {
                    "id": "a0726eec-1e8b-4110-9c4e-04ed1331fef1",
                    "participant_id": "urn:authenticateit:participant:1",
                    "participant_logo": "https://dev-cdn.shping.com/2022/11/9/26775146-4028-426d-8874-f6f8d3e39e57.png",
                    "participant_name": "Authenticateit Pty Ltd",
                    "text": "Hello !!!!",
                    "ts": "2022-11-21T01:13:57Z",
                    "user_id": "urn:authenticateit:user:email:system@authenticateit.com"
                }
            ],
            "counters": {
                "dislikes": 0,
                "likes": 1
            },
            "country": "036",
            "first_name": "First 5",
            "id": "urn:authenticateit:review_doc:997959703086763",
            "images": [
                {
                    "url": "https://learnopencv.com/wp-content/uploads/2021/04/image-15.png"
                }
            ],
            "images_orig": [
                {
                    "url": "https://learnopencv.com/wp-content/uploads/2021/04/image-15.png"
                }
            ],
            "last_name": "Last 5",
            "level_icon": "https://cdn.shping.com/2017/11/22/d19659ca-2fe0-41c4-bafe-f4b54a67cf61.png",
            "post_code": "3004",
            "product": {
                "counters": {
                    "user_reviews": 1,
                    "user_reviews_rate": 4.0,
                    "user_scans": 9
                },
                "id": "04499988844441",
                "name": "444444444444"
            },
            "reviews_karma": 2,
            "rich_data": [
                {
                    "coin_weight": 0.19672,
                    "id": "ed8690cf-ec6e-4578-bb1a-1466c79e8ddd",
                    "required": true,
                    "title": "assdaas",
                    "type": "image",
                    "url": "https://learnopencv.com/wp-content/uploads/2021/04/image-15.png",
                    "url_orig": "https://learnopencv.com/wp-content/uploads/2021/04/image-15.png"
                },
                {
                    "coin_weight": 0.65574,
                    "height": 1280,
                    "id": "044f298b-b84d-41d3-92c1-f54744df3fa2",
                    "preview": "https://dev-cdn.shping.com/2022/11/18/2b46a749-4be9-4ca9-8fb3-014f053db4b1",
                    "title": "Upload video ",
                    "type": "video",
                    "url": "https://dev-cdn.shping.com/2022/11/18/f6e104d9-5cab-4653-9973-6540b705421c.mp4",
                    "width": 720
                }
            ],
            "scan_id": "56a26149-7978-4b28-bfc3-c06b3687874d",
            "source": "tmb",
            "source_icon": "https://cdn.shping.com/2018/1/28/a759926f-0826-4d90-9d62-61aa4d202d56.png",
            "tags": [],
            "ts": "2022-11-18T00:00:45Z",
            "user_age": 52,
            "user_icon": "https://dev-cdn.shping.com/2022/11/9/0581b6f9-79a1-4096-9611-bb88ad31f6af",
            "user_id": "urn:authenticateit:user:email:shping:9cf92a52-e708-4d45-a7f5-53ed475c1c3c",
            "user_like_option": "like",
            "videos": [
                {
                    "height": 1280,
                    "preview": "https://dev-cdn.shping.com/2022/11/18/2b46a749-4be9-4ca9-8fb3-014f053db4b1",
                    "url": "https://dev-cdn.shping.com/2022/11/18/f6e104d9-5cab-4653-9973-6540b705421c.mp4",
                    "width": 720
                }
            ]
        }
    ]
}

Read document by id

Endpoint for users to read document

GET /reviews-service/review_docs/document/:review_id
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
review_id string Review identifier
Example Response
{
    "comments": [
        {
            "id": "a0726eec-1e8b-4110-9c4e-04ed1331fef1",
            "participant_id": "urn:authenticateit:participant:1",
            "participant_logo": "https://dev-cdn.shping.com/2022/11/9/26775146-4028-426d-8874-f6f8d3e39e57.png",
            "participant_name": "Authenticateit Pty Ltd",
            "text": "Hello !!!!",
            "ts": "2022-11-21T01:13:57Z",
            "user_id": "urn:authenticateit:user:email:system@authenticateit.com"
        }
    ],
    "counters": {
        "dislikes": 0,
        "likes": 1
    },
    "country": "036",
    "first_name": "First 5",
    "id": "urn:authenticateit:review_doc:997959703086763",
    "images": [
        {
            "url": "https://learnopencv.com/wp-content/uploads/2021/04/image-15.png"
        }
    ],
    "images_orig": [
        {
            "url": "https://learnopencv.com/wp-content/uploads/2021/04/image-15.png"
        }
    ],
    "last_name": "Last 5",
    "level_icon": "https://cdn.shping.com/2017/11/22/d19659ca-2fe0-41c4-bafe-f4b54a67cf61.png",
    "post_code": "3004",
    "product": {
        "counters": {
            "user_reviews": 1,
            "user_reviews_rate": 4.0,
            "user_scans": 9
        },
        "id": "04499988844441",
        "name": "444444444444"
    },
    "reviews_karma": 2,
    "rich_data": [
        {
            "coin_weight": 0.19672,
            "id": "ed8690cf-ec6e-4578-bb1a-1466c79e8ddd",
            "required": true,
            "title": "assdaas",
            "type": "image",
            "url": "https://learnopencv.com/wp-content/uploads/2021/04/image-15.png",
            "url_orig": "https://learnopencv.com/wp-content/uploads/2021/04/image-15.png"
        },
        {
            "coin_weight": 0.65574,
            "height": 1280,
            "id": "044f298b-b84d-41d3-92c1-f54744df3fa2",
            "preview": "https://dev-cdn.shping.com/2022/11/18/2b46a749-4be9-4ca9-8fb3-014f053db4b1",
            "title": "Upload video ",
            "type": "video",
            "url": "https://dev-cdn.shping.com/2022/11/18/f6e104d9-5cab-4653-9973-6540b705421c.mp4",
            "width": 720
        }
    ],
    "scan_id": "56a26149-7978-4b28-bfc3-c06b3687874d",
    "source": "tmb",
    "source_icon": "https://cdn.shping.com/2018/1/28/a759926f-0826-4d90-9d62-61aa4d202d56.png",
    "tags": [],
    "ts": "2022-11-18T00:00:45Z",
    "user_age": 52,
    "user_icon": "https://dev-cdn.shping.com/2022/11/9/0581b6f9-79a1-4096-9611-bb88ad31f6af",
    "user_id": "urn:authenticateit:user:email:shping:9cf92a52-e708-4d45-a7f5-53ed475c1c3c",
    "user_like_option": "none",
    "user_locality": "MELBOURNE",
    "user_state": "VIC",
    "user_state_name": "Victoria",
    "videos": [
        {
            "height": 1280,
            "preview": "https://dev-cdn.shping.com/2022/11/18/2b46a749-4be9-4ca9-8fb3-014f053db4b1",
            "url": "https://dev-cdn.shping.com/2022/11/18/f6e104d9-5cab-4653-9973-6540b705421c.mp4",
            "width": 720
        }
    ]
}

Read product rating

GET /reviews-service/review_docs/product/score
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
product_id string product_id
scan_id string scan_id
review_id string review_id
Example Response
{
    "product_score": {
        "product_reviews_rate": 4.508771929824562,
        "rates": [
            {
                "count": 1,
                "star": 0
            },
            {
                "count": 1,
                "star": 1
            },
            {
                "count": 1,
                "star": 2
            },
            {
                "count": 5,
                "star": 3
            },
            {
                "count": 11,
                "star": 4
            },
            {
                "count": 39,
                "star": 5
            }
        ],
        "total_reviews": 58
    }
}

Read Documents by API Key and Tag

Public endpoint to read approved review documents. Participant API key must be specified. Only reviews for products of this participant which were tagged with the specified tag will be selected.

The tag is optional, and tags part may be ommitted from the request URL. The review documents tags are not checked in this case.

Response has only the limited number (100 by default) of newest reviews in reviews field.

Origin header is required in calls to this endpoint. Origin is compared to the list of participant's API domains on OPTIONS requests.

This API may be called by a signed in participant to retrieve latest reviews for participant products. api_key and tag must be omitted in this case. Origin header isn't required for such request.

GET /reviews-service/reviews/:api_key
GET /reviews-service/reviews/:api_key/tags/:tag
GET /reviews-service/reviews/:api_key/tags/:tag?gtins=:gtin1,:gtin2%steps_filter=:q3&step_titles_filter=:q1,:q2
Parameters
Name Type Description
api_key string Participant API key
tag string Select only reviews tagged with this string
limit number Limit the number of returned reviews (from 1 to 500. Default - 100)
offset number Offset the number of returned reviews
gtins string List of gtins divided by comma. Return only reviews filtered by products
steps_filter string Widgets filter
step_titles_filter string Widgets titles filter
group string Group reviews (true - default) or not (false)

steps_filter and step_titles_filter may be a list of values textbox,question

Example Response
{
  "reviews": [
   {
        "comments": [
            {
                "id": "c9275d5d-26b3-4a02-83d1-8c87f8ff5b44",
                "participant_id": "urn:authenticateit:participant:1",
                "text": "Some test comment",
                "ts": "2021-08-10T14:17:30Z",
                "user_id": "urn:authenticateit:user:email:system@authenticateit.com"
            }
        ],
        "counters": {
            "dislikes": 0,
            "likes": 0
        },
        "country": "036",
        "first_name": "I",
        "id": "urn:authenticateit:review_doc:406991437016301",
        "images": [],
        "images_orig": null,
        "last_name": "V",
        "level_icon": "https://cdn.shping.com/2017/11/22/0612ecb0-1d92-4125-a8bc-17e1010ea74b.png",
        "post_code": "1111111111",
        "product": {
            "counters": {
                "user_reviews": 0,
                "user_reviews_rate": 0,
                "user_scans": 1
            },
            "id": "09300644700979",
            "name": "Campbells Deli Selections + Pasta Seasoned Chicken & Mushroom + Fusilli Pasta 11 X 33g"
        },
        "rate": 3,
        "reviews_karma": 0,
        "rich_data": [
            {
                "coin_weight": 0.16666,
                "id": "da25a48f-e4da-48dc-a9c7-1439dca2b649",
                "text": "Wow",
                "title": "Textbox",
                "type": "textbox"
            },
            {
                "coin_weight": 0.16666,
                "id": "9a6ef038-174c-4388-bd8d-e0e2b72cbd7e",
                "rating": 3,
                "title": "Rate1",
                "type": "rating"
            },
            {
                "coin_weight": 0.16667,
                "id": "643f737e-a273-43ed-85d0-3ca7b20827e3",
                "rating": 2,
                "title": "Rate2",
                "type": "rating"
            },
            {
                "answer_index": 1,
                "answers": [
                    {
                        "answer": "Ans1"
                    },
                    {
                        "answer": "Ans2"
                    }
                ],
                "choice": "single",
                "coin_weight": 0.16667,
                "id": "b7a58028-ad78-415e-8c22-c3886ef5de47",
                "question": "Qestion?",
                "title": "Qestion",
                "type": "question"
            },
            {
                "answer_index": 1,
                "answers": [
                    {
                        "answer": "Good"
                    },
                    {
                        "answer": "Not bad"
                    },
                    {
                        "answer": "Great"
                    },
                    {
                        "answer": "Bad"
                    },
                    {
                        "answer": "None"
                    }
                ],
                "choice": "single",
                "coin_weight": 0.16667,
                "id": "8fee9e36-3024-4326-b544-f3cefd180140",
                "question": "How?",
                "title": "Pleas answer",
                "type": "question"
            },
            {
                "answer_index": 1,
                "answers": [
                    {
                        "answer": "Good"
                    },
                    {
                        "answer": "Bad"
                    },
                    {
                        "answer": "N"
                    }
                ],
                "choice": "single",
                "coin_weight": 0.16667,
                "id": "20ceedd6-6c42-44c0-98ae-83b1c9b749e3",
                "question": "How2",
                "title": "Q2",
                "type": "question"
            },
            {
                "id": "aceada74-fd42-420f-ab92-b694d028ee6b",
                "text": "Some text",
                "title": "Some text Brand",
                "type": "text"
            }
        ],
        "source": "tmb",
        "source_icon": "https://cdn.shping.com/2018/1/28/a759926f-0826-4d90-9d62-61aa4d202d56.png",
        "tags": [],
        "text": "Textbox\nWow\n\nQestion\nQestion?\nAns2\n\nPleas answer\nHow?\nNot bad\n\nQ2\nHow2\nBad",
        "ts": "2021-04-08T15:18:46Z",
        "user_icon": "https://dev-cdn.shping.com/2021/4/8/03dc06ed-15c4-4e7d-9b83-9fd53e05fb77",
        "user_like_option": "none"
    },
    {
      "counters": {
        "dislikes": 0,
        "likes": 0
      },
      "first_name": "Роза",
      "id": "urn:authenticateit:review_doc:123293617430188",
      "images": [
        {
          "url": "https://dev-cdn.shping.com/2018/12/4/9848fdbb-fa48-4703-8d38-65779b8f8ffe"
        }
      ],
      "last_name": "Ковалева",
      "level_icon": "https://cdn.shping.com/2017/11/22/2f98de94-73bf-4b40-9490-e4a8a714264c.png",
      "product": {
        "counters": {
          "user_reviews": 37,
          "user_reviews_rate": 4.5676,
          "user_scans": 265
        },
        "id": "09212345874678",
        "name": "Варенье Ратибор Вишня 400 г"
      },
      "rate": 4,
      "reviews_karma": 1,
      "text": "Текст",
      "ts": "2018-12-04T12:33:34Z",
      "user_icon": null,
      "user_like_option": "none"
    }
  ]
}

Admin's API

Endpoint for reviews_admin to read list of documents. Roles required: “reviews_admin”

Read documents list

POST /reviews-service/review_docs
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
page number Page of docs. Value >= 0
limit number the number of elements on the page
countries array::string Countries filter
languages array::string Languages filter
statuses array::string Statuses filter.
lock boolean Select only unlocked documents or documents locked by current admin
locked_by_name string Select only documents related to the specified moderator name
locked_by string Select only documents related to the specified moderator id
locked_at_from string Moderated datetime filter
locked_at_to string Moderated datetime filter
gtin string Select only documents related to the specified GTIN
user_name string Select only documents related to the specified user
tags list Select only documents with the specified tags

statuses filter accepts list of values ["open","approve","reject","report","delete"].

Example Request
{
  "limit":10,
  "page":0,
  "statuses":["approve", "report"],
  "tags": [
    "model2000"
  ],
  "locked_by_name": "Joye",
  "locked_at_from": "2019-02-25T12:34:00Z",
  "locked_at_to": "2019-02-25T12:34:00Z",
  "locked_by": "urn:authenticateit:user:email:1devp14@mailinator.com",
}
Example Response
{
  "count": 2,
  "documents": [
    {
      "comments": [
        {
          "id": "651d3802-164c-4328-a65e-0b08a4c901f8",
          "participant_id": "urn:authenticateit:participant:735879621218609",
          "text": "Some comment",
          "ts": "2020-12-16T14:35:02Z",
          "user_id": "urn:authenticateit:user:email:ethertest3@mailinator.com"
        }
      ],
      "counters": {
        "dislikes": 7,
        "likes": 4
      },
      "country": "036",
      "id": "urn:authenticateit:review_doc:174863795027187",
      "images": [
        {
          "url": "https://dev-cdn.shping.com/2018/10/5/8662ecc9-1111-4043-ad69-0fd428530d0f.jpg"
        }
      ],
      "language": "en",
      "lock": 1,
      "locked_at": "2019-02-25T12:34:00Z",
      "locked_by": "urn:authenticateit:user:email:ethertest3@mailinator.com",
      "locked_by_first_name": "Joye",
      "locked_by_last_name": "Tribiani",
      "owner": "urn:authenticateit:user:email:65qw@mailinator.com",
      "product_id": "00498765432998",
      "product_name": "Kellogg's Nutri Grain 805 g",
      "rate": 3,
      "reports": [
        {
          "report": "Test",
          "ts": "2019-01-04T03:36:54Z",
          "user": {
            "first_name": "Ethertest3",
            "last_name": "Ethertest3",
            "level": "basic",
            "photo": null
          }
        }
      ],
      "review_deleted": false,
      "status": "approve",
      "tags": [
        "bestreviews",
        "model2000"
      ],
      "text": "65 test",
      "ts": "2018-10-15T14:24:36Z",
      "user_name": "SMARTY Fellow",
      "user_photo": "https://dev-cdn.shping.com/2018/8/1/9ee10d3a-ee36-43e3-8692-8df003629bb4"
    },
    {
      "counters": {
        "dislikes": 0,
        "likes": 1
      },
      "country": "036",
      "id": "urn:authenticateit:review_doc:538484402817957",
      "images": [
        {
          "url": "https://dev-cdn.shping.com/2018/10/5/8662ecc9-1111-4043-ad69-0fd428530d0f.jpg"
        }
      ],
      "language": "en",
      "lock": 1,
      "locked_at": "2019-02-25T12:34:00Z",
      "locked_by": "urn:authenticateit:user:email:ethertest3@mailinator.com",
      "owner": "urn:authenticateit:user:email:ethertest3@mailinator.com",
      "product_id": "00498765432998",
      "locked_by_first_name": "Joye",
      "locked_by_last_name": "Tribiani",
      "product_name": "Kellogg's Nutri Grain 805 g",
      "rate": 3,
      "reports": [
        {
          "report": "Erwerwerwerwerwerwe",
          "ts": "2019-01-03T10:03:51Z",
          "user": {
            "first_name": "Ethertest3",
            "last_name": "Ethertest3",
            "level": "basic",
            "photo": null
          }
        }
      ],
      "review_deleted": false,
      "status": "approve",
      "tags": [
        "bestreviews",
        "model2000"
      ],
      "text": "test",
      "ts": "2018-10-15T13:35:07Z",
      "user_name": "Ethertest3 Ethertest3",
      "user_photo": null
    }
  ]
}

Lock (read) document

Endpoint for admins to lock the document. Roles required: “reviews_admin”

PUT /reviews-service/review_doc/lock/:id
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
id url Document id
Example Response
{
  "conditions": {
    "country": "643",
    "language": "ru"
  },
  "data": {
    "images": [
      {
        "url": "https://www.foo.com/image.jpg"
      },
      {
        "url": "https://www.foo.com/image2.jpg"
      },
      {
        "url": "1"
      }
    ],
    "rate": 5,
    "text": "Some text"
  },
  "id": "urn:authenticateit:review_doc:307274164862979",
  "lock": true,
  "locked_by": "urn:authenticateit:user:email:65qw@mailinator.com",
  "owner": "urn:authenticateit:user:email:65qw@mailinator.com",
  "product_id": "04324654768588",
  "scan_id": "0b46d928-fcbe-4ee3-b9ea-54c7f7a01cde",
  "status": "open",
  "ts": "2017-08-23T08:00:51Z",
  "type": "review_doc",
  "user_level": "platinum"
}

Unlock document

Endpoint for admins to unlock the document. Roles required: “reviews_admin”

PUT /reviews-service/review_doc/unlock/:id
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
id url Document id
Example Response
{
  "conditions": {
    "country": "643",
    "language": "ru"
  },
  "data": {
    "images": [
      {
        "url": "https://www.foo.com/image.jpg"
      },
      {
        "url": "https://www.foo.com/image2.jpg"
      },
      {
        "url": "1"
      }
    ],
    "rate": 5,
    "text": "Some text"
  },
  "id": "urn:authenticateit:review_doc:307274164862979",
  "owner": "urn:authenticateit:user:email:65qw@mailinator.com",
  "product_id": "04324654768588",
  "scan_id": "0b46d928-fcbe-4ee3-b9ea-54c7f7a01cde",
  "status": "open",
  "ts": "2017-08-23T08:00:51Z",
  "type": "review_doc",
  "user_level": "platinum"
}

Review document

Endpoint for admins for accept or reject previously locked unreviewed document. Roles required: “reviews_admin”.

A list of tags may be attached to a review using tags parameter.

Original text and images may be overridden for the review. Original text and images will be kept in the text_orig and images_orig fields in the review document.

PUT /reviews-service/review_doc/review/:id
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
id url Document id
status string New status (approve or reject)
tags list Optional list of tags to attach.
text string New text for the review.
images list New images for the review.
rejection_reason_id string Valid review rejection reason id

If status=reject the rejection_reason_id must be present (Get list of review rejection reasons)

Example Response. Approve
{
  "status": "approve",
  "text": "Corrected text.",
  "tags": [
    "bestreviews",
    "model2000"
  ]
}
Example Response. Reject
{
  "status": "reject",
  "rejection_reason_id": "review_related_to_other_products"
}

Update Images in Review

Endpoint for admins to override images or text in existing review documents. Requires role reviews_admin.

POST /reviews-service/review_doc/review/:id/override
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
id url Document id
Example Response
{
  "text": "Corrected text.",
  "images": [
    {
      "url": "https://example.com/a.jpg"
    },
    {
      "url": "https://example.com/b.jpg"
    }
  ]
}

Update Review Tags

Endpoint for review admins to update review document tags. Accepts list of tags in the request body.

PUT /reviews-service/review_docs/:id/tags
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
id string Review identifier
tags list List of tags for the review
Example Request
{
  "tags": [
    "bestreviews",
    "model2000",
    "witty"
  ]
}

Mark approved document as deleted

DELETE /reviews-service/review_doc/:id
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
id url Document id
Example Response
{
    "review_deleted": true
}

Delete attached reports

DELETE /reviews-service/review_doc/:id/reports
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
id url Document id
Example Response
{
    "campaigns": [
        {
            "campaign": "urn:authenticateit:campaign:513678827290770",
            "claim_id": "39f8abcb-7ddd-4e22-8f86-f270f07c3b53"
        }
    ],
    "conditions": {
        "country": "036",
        "language": "en"
    },
    "data": {
        "images": [
            {
                "url": "https://dev-cdn.shping.com/2018/10/5/8662ecc9-1111-4043-ad69-0fd428530d0f.jpg"
            }
        ],
        "rate": 3,
        "text": "test"
    },
    "id": "urn:authenticateit:review_doc:538484402817957",
    "lock": true,
    "locked_by": "urn:authenticateit:user:email:ethertest3@mailinator.com",
    "owner": "urn:authenticateit:user:email:ethertest3@mailinator.com",
    "product_id": "00498765432998",
    "scan_id": "ea6fd894-c51c-4ef3-b05b-cf8f27b42697",
    "status": "approve",
    "ts": "2018-10-15T13:35:07Z",
    "type": "review_doc",
    "user_level": "basic"
}

Copy reviews from one product to another

This method for copy only approved reviews from source_product to target_product. source_product and target_product must be valid. If requester is system participant, all reviews will be copied.

PUT /reviews-service/review_docs/copy
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
source_product string Required: Source gtin
target_product string Required: Target gtin
Example Request
{
    "source_product": "02933451111118",
    "target_product": "02933451004427"
}
Example Response
[
    {
        "source_review": "urn:authenticateit:review_doc:620638059285116",
        "target_review": "urn:authenticateit:review_doc:797222039553212"
    },
    {
        "source_review": "urn:authenticateit:review_doc:102910629259831",
        "target_review": null
    },
    {
        "source_review": "urn:authenticateit:review_doc:401529747502451",
        "target_review": null
    }
]

If target_review=null it means that source_review was already copied.

Create Batch Review Task

Multiple reviews may be approved or rejected using this endpoint. Accepts list of review_docs identifiers to be reviewed and status (approve or reject). List of arbitrary tags may be attached to reviews. Initiates a backround task and responds with the id of the task. Task status may be queried using this id.

POST /reviews-service/review/tasks
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket

If status=reject the rejection_reason_id must be present (Get list of review rejection reasons)

Example Request
{
  "review_docs": [
    "urn:authenticateit:review_doc:598568744187626",
    "urn:authenticateit:review_doc:000000000000000",
    "urn:authenticateit:review_doc:804612316302535"
  ],
  "status": "approve",
  "tags": [
    "bestreviews",
    "model2000"
  ]
}
Example Response
{
  "id": "532a5a66-4463-475d-91f8-3e08a1cfa10d"
}

Status of Batch Review Task

Endpoint to query status of a batch review task. Response will have the following fields:

  • id — task identifier.
  • status — task status (started after the task creation, finished once all documents are processed).
  • num_total, num_processed — total number of review documents and the number of already processed documents.
  • started, finished — time at which the task was started and finished.
  • errors — list of errors occured during the batch review. Each entry has review_doc document identifier and error_id identifier of the corresponding error. Possible errors are the same as for the Review Document endpoint.

Status for the finished tasks will be kept for at least 12 hours after the completion.

GET /reviews-service/review/tasks/:id
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
id string Task identifier.
Example Response
{
  "errors": [
    {
      "error_id": "reviews-no_doc",
      "review_doc": "urn:authenticateit:review_doc:000000000000000"
    }
  ],
  "finished": "2019-04-28T07:02:12Z",
  "id": "532a5a66-4463-475d-91f8-3e08a1cfa10d",
  "num_processed": 3,
  "num_total": 3,
  "started": "2019-04-28T07:02:11Z",
  "status": "finished"
}

Status of All Batch Review Tasks

Get status of all batch review tasks for the participant. Response has list of tasks. Each entry represents a single task (see Task Status endpoint for task representation).

GET /reviews-service/review/tasks
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
Example Response
{
  "tasks": [
    {
      "errors": [
        {
          "error_id": "reviews-no_doc",
          "review_doc": "urn:authenticateit:review_doc:000000000000000"
        }
      ],
      "finished": "2019-04-28T07:02:12Z",
      "id": "532a5a66-4463-475d-91f8-3e08a1cfa10d",
      "num_processed": 3,
      "num_total": 3,
      "started": "2019-04-28T07:02:11Z",
      "status": "finished"
    }
  ]
}

Review Templates

Participant endpoints for review templates require reviews_admin role.

Create Template

Create review template for participant. Accepts JSON representation of a template, which consists of the following fields:

  • name — template name.
  • active — template will be set as active, if true. The field is optional and is false by default. Onle one review template may be active. If active set to true, previously active template will be deactivated.
  • steps — non-empty list of review steps (see below for description).

Review steps are the same as the steps in ToDo cards (see ToDo Cards API for details) with new step type video and minor differences regarding step of type question.

Step type may be video. No other fields are defined for such step. User will be asked to upload a video file to complete the step.

Unlike questions in ToDo cards, review questions don't have correct answers (there is no correct field in answers). Questions in reviews may be of either single or multiple choice (field choice in the step of type question may have value single or multiple).

Any step (except text) could be extended with coin_weight parameter with positive integer value (coin_weight >= 0).

Any step could be extended with answer_title and answer_title_enabled parameters wich allows to replace titles in the result data.

POST /reviews-service/templates
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
Example Request
{
  "name": "Template 1",
  "active": true,
  "steps": [
    {
      "type": "text",
      "title": "Some Text",
      "text": "More details.",
      "answer_title": "Some Text",
      "answer_title_enabled": false
    },
    {
      "type": "textbox",
      "required": true,
      "title": "Enter Text",
      "answer_title": "User entered text",
      "answer_title_enabled": true
    },
    {
      "type": "rating",
      "required": true,
      "title": "Rate this product",
      "answer_title": "My rate is",
      "answer_title_enabled": true
    },
    {
      "type": "question",
      "required": false,
      "title": "Question 1",
      "choice": "single",
      "question": "Choose one item",
      "answer_title": "My Question answer",
      "answer_title_enabled": true,
      "answers": [
        {
          "answer": "A"
        },
        {
          "answer": "B"
        },
        {
          "answer": "C"
        }
      ]
    },
    {
      "type": "question",
      "required": true,
      "title": "Question 2",
      "choice": "multiple",
      "question": "Choose one or more items",
      "answer_title": "My Question answer",
      "answer_title_enabled": true,
      "answers": [
        {
          "answer": "A"
        },
        {
          "answer": "B"
        },
        {
          "answer": "C"
        }
      ]
    },
    {
      "type": "image",
      "required": true,
      "title": "Upload the photo",
      "answer_title": "Look! I have a photo!",
      "answer_title_enabled": true
    },
    {
      "type": "video",
      "required": false,
      "title": "Upload video review of the product",
      "answer_title": "Look! I also have a video!",
      "answer_title_enabled": true
    }
  ]
}
Example Response
{
    "active": true,
    "created": "2020-03-24T15:39:20Z",
    "id": "urn:authenticateit:participant:1:review_template:188657452624225",
    "name": "Template 1",
    "owner": "urn:authenticateit:participant:1",
    "steps": [
    {
      "type": "text",
      "title": "Some Text",
      "text": "More details.",
      "answer_title": "Some Text",
      "answer_title_enabled": false
    },
    {
      "type": "textbox",
      "required": true,
      "title": "Enter Text",
      "answer_title": "User entered text",
      "answer_title_enabled": true
    },
    {
      "type": "rating",
      "required": true,
      "title": "Rate this product",
      "answer_title": "My rate is",
      "answer_title_enabled": true
    },
    {
      "type": "question",
      "required": false,
      "title": "Question 1",
      "choice": "single",
      "question": "Choose one item",
      "answer_title": "My Question answer",
      "answer_title_enabled": true,
      "answers": [
        {
          "answer": "A"
        },
        {
          "answer": "B"
        },
        {
          "answer": "C"
        }
      ]
    },
    {
      "type": "question",
      "required": true,
      "title": "Question 2",
      "choice": "multiple",
      "question": "Choose one or more items",
      "answer_title": "My Question answer",
      "answer_title_enabled": true,
      "answers": [
        {
          "answer": "A"
        },
        {
          "answer": "B"
        },
        {
          "answer": "C"
        }
      ]
    },
    {
      "type": "image",
      "required": true,
      "title": "Upload the photo",
      "answer_title": "Look! I have a photo!",
      "answer_title_enabled": true
    },
    {
      "type": "video",
      "required": false,
      "title": "Upload video review of the product",
      "answer_title": "Look! I also have a video!",
      "answer_title_enabled": true
    }
  ]
}
Example Request
{
  "name": "Template 1",
  "active": true,
  "steps": [
    {
      "type": "text", 
      "title": "Some Text",
      "answer_title_enabled": false,
      "text": "More details."
    },
    {
      "type": "textbox", 
      "coin_weight":1,
      "required": true,
      "answer_title_enabled": false,
      "title": "Enter Text"
    },
    {
      "type": "rating",
      "coin_weight":0,
      "required": false,
      "answer_title_enabled": false,
      "title": "Rate this product"
    },
    {
      "type": "question",
      "title": "Question 1",
      "coin_weight":2,
      "choice": "single", 
      "question": "Choose one item",
      "answer_title_enabled": false,
      "answers": [
        {
          "answer": "A"
        },
        {
          "answer": "B"
        },
        {
          "answer": "C"
        }
      ]
    },
    {
      "type": "question",
      "title": "Question 2",
      "answer_title_enabled": false,
      "choice": "multiple",
      "question": "Choose one or more items",
      "answers": [
        {
          "answer": "A"
        },
        {
          "answer": "B"
        },
        {
          "answer": "C"
        }
      ]
    },
    {
      "type": "image",
      "answer_title_enabled": false,
      "title": "Upload the photo"
    },
    {
      "type": "video",
      "answer_title_enabled": false,
      "title": "Upload video review of the product"
    }
  ]
}
Example Response
{
    "active": true,
    "created": "2020-03-24T15:37:59Z",
    "id": "urn:authenticateit:participant:1:review_template:544209527006813",
    "name": "Template 1",
    "owner": "urn:authenticateit:participant:1",
    "steps": [
        {
            "id": "b64a0402-3ee3-4faf-85be-cb67a4bce329",
            "text": "More details.",
            "answer_title_enabled": false,
            "title": "Some Text",
            "type": "text"
        },
        {
            "coin_weight": 1,
            "required": true,
            "title": "Enter Text",
            "answer_title_enabled": false,
            "type": "textbox"
        },
        {
            "coin_weight": 0,
            "required": false,
            "title": "Rate this product",
            "answer_title_enabled": false,
            "type": "rating"
        },
        {
            "answers": [
                {
                    "answer": "A"
                },
                {
                    "answer": "B"
                },
                {
                    "answer": "C"
                }
            ],
            "choice": "single",
            "coin_weight": 2,
            "question": "Choose one item",
            "answer_title_enabled": false,
            "title": "Question 1",
            "type": "question"
        },
        {
            "answers": [
                {
                    "answer": "A"
                },
                {
                    "answer": "B"
                },
                {
                    "answer": "C"
                }
            ],
            "choice": "multiple",
            "coin_weight": 0,
            "question": "Choose one or more items",
            "answer_title_enabled": false,
            "title": "Question 2",
            "type": "question"
        },
        {
            "coin_weight": 0,
            "title": "Upload the photo",
            "answer_title_enabled": false,
            "type": "image"
        },
        {
            "coin_weight": 0,
            "title": "Upload video review of the product",
            "answer_title_enabled": false,
            "type": "video"
        }
    ]
}

Read Templates

Read all review templates for the participant. Response has templates list. Each list entry is a review template JSON representation.

GET /reviews-service/templates
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
Example Response
{
  "templates": [
    {
      "active": true,
      "created": "2020-03-24T15:40:26Z",
      "id": "urn:authenticateit:participant:1:review_template:312365731746844",
      "name": "Template 1",
      "owner": "urn:authenticateit:participant:1",
      "steps": [
        {
            "id": "b64a0402-3ee3-4faf-85be-cb67a4bce329",
            "text": "More details.",
            "title": "Some Text",
            "type": "text"
        },
        {
            "coin_weight": 1,
            "required": true,
            "title": "Enter Text",
            "type": "textbox"
        },
        {
            "coin_weight": 0,
            "required": false,
            "title": "Rate this product",
            "type": "rating"
        },
        {
            "answers": [
                {
                    "answer": "A"
                },
                {
                    "answer": "B"
                },
                {
                    "answer": "C"
                }
            ],
            "choice": "single",
            "coin_weight": 2,
            "question": "Choose one item",
            "title": "Question 1",
            "type": "question"
        },
        {
            "answers": [
                {
                    "answer": "A"
                },
                {
                    "answer": "B"
                },
                {
                    "answer": "C"
                }
            ],
            "choice": "multiple",
            "coin_weight": 0,
            "question": "Choose one or more items",
            "title": "Question 2",
            "type": "question"
        },
        {
            "coin_weight": 0,
            "title": "Upload the photo",
            "type": "image"
        },
        {
            "coin_weight": 0,
            "title": "Upload video review of the product",
            "type": "video"
        }
      ]
    }
  ]
}

Update Template

Update specified review template. The endpoint can be used to update name or steps of the template. Also review template may be activated (set active to true) or deactivated (set active to false). Only one review template may be active. If some template is activated, previously active template will be deactivated.

PUT /reviews-service/templates/:id
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
id string Template identifier
Example Request
{
  "name": "Template One",
  "active": false
}
Example Response
{
  "active": true,
  "created": "2020-03-24T15:40:26Z",
  "id": "urn:authenticateit:participant:1:review_template:312365731746844",
  "name": "Template One",
  "owner": "urn:authenticateit:participant:1",
  "steps": [
    {
      "text": "More details.",
      "title": "Some Text",
      "type": "text"
    },
    {
      "coin_weight": 1,
      "title": "Enter Text",
      "type": "textbox"
    },
    {
      "coin_weight": 0,
      "title": "Rate this product",
      "type": "rating"
    },
    {
      "answers": [
        {
          "answer": "A"
        },
        {
          "answer": "B"
        },
        {
          "answer": "C"
        }
      ],
      "choice": "single",
      "coin_weight": 1,
      "question": "Choose one item",
      "title": "Question 1",
      "type": "question"
    },
    {
      "answers": [
        {
          "answer": "A"
        },
        {
          "answer": "B"
        },
        {
          "answer": "C"
        }
      ],
      "choice": "multiple",
      "coin_weight": 0,
      "question": "Choose one or more items",
      "title": "Question 2",
      "type": "question"
    },
    {
      "coin_weight": 0,
      "title": "Upload the photo",
      "type": "image"
    },
    {
      "coin_weight": 0,
      "title": "Upload video review of the product",
      "type": "video"
    }
  ]
}

Delete Template

Delete the requested review template.

DELETE /reviews-service/templates/:id
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
id string Template identifier

Start Template-Based Review

Endpoint for user to start a template-based review for the specified scanned product.

Request body must include scan_id with the scan identifier.

Responds with unfilled review representation, if scanned product has reviews enabled, and participant related to the product has an active review template. Otherwise responds with reviews-no_active_template error.

Unfilled review has an id and a list of steps from the template to be completed. For details on steps representation see Create Template endpoint description.

POST /reviews-service/templates/reviews/start
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
Example Request
{
  "scan_id": "9e79347e-12cf-4f26-9f76-c9c00649352d"
}
Example Response (there is an active template for the product)
{
  "id": "urn:authenticateit:review_doc:745047469332036",
  "steps": [
    {
      "id": "07ba9f01-0b73-4dd5-9ea7-10e77ea863a5",
      "text": "More details.",
      "title": "Some Text",
      "type": "text"
    },
    {
      "id": "ad392e36-4ad2-4014-90b1-9bac2bc547f8",
      "title": "Enter Text",
      "required": true,
      "coin_weight": 0.9,
      "type": "textbox"
    },
    {
      "id": "e85c9131-4739-4b0c-847e-130be74d7dda",
      "title": "Rate this product",
      "required": false,
      "coin_weight": 0.1,
      "type": "rating"
    },
    {
      "id": "e6e4b08b-e1bd-4c41-bba8-86e07e59e571",
      "answers": [
        {
          "answer": "A"
        },
        {
          "answer": "B"
        },
        {
          "answer": "C"
        }
      ],
      "choice": "single",
      "question": "Choose one item",
      "title": "Question 1",
      "coin_weight": 0,
      "type": "question"
    },
    {
      "id": "84b0e950-f399-4789-b744-1b63ba037706",
      "answers": [
        {
          "answer": "A"
        },
        {
          "answer": "B"
        },
        {
          "answer": "C"
        }
      ],
      "choice": "multiple",
      "question": "Choose one or more items",
      "title": "Question 2",
      "coin_weight": 0,
      "type": "question"
    },
    {
      "id": "310a4b9f-05d0-4d26-85f5-0d7411d4372e",
      "title": "Upload the photo",
      "coin_weight": 0,
      "type": "image"
    },
    {
      "id": "01b9728f-564e-4ad1-97d0-ee38426909a8",
      "type": "video",
      "coin_weight": 0,
      "title": "Upload video review of the product"
    }
  ]
}
Example Response (there is no active template)
{
  "error": "Product owner doesn't have an active review template.",
  "error_data": null,
  "error_id": "reviews-no_active_template",
  "error_object": null
}

Finish Template-Based Review

Endpoint for user to complete template-based review.

Request body must contain id of the review document created with the Start Review endpoint and list of completed review steps from template.

Step of type video must have url field (URL of the uploaded video).

Completed review questions may be of either single or multiple choice (depending on the choice field in the corresponding template). For single choice questions answer_index must be single integer index. For multiple choice questions answer_index must be list of integer indices (see example response below).

POST /reviews-service/templates/reviews/finish
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
Example Request
{
  "id": "urn:authenticateit:review_doc:745047469332036",
  "steps": [
    {
      "id": "07ba9f01-0b73-4dd5-9ea7-10e77ea863a5",
      "type": "text"
    },
    {
      "id": "ad392e36-4ad2-4014-90b1-9bac2bc547f8",
      "type": "textbox",
      "text": "A, B and C."
    },
    {
      "id": "e85c9131-4739-4b0c-847e-130be74d7dda",
      "type": "rating",
      "rating": 3
    },
    {
      "id": "e6e4b08b-e1bd-4c41-bba8-86e07e59e571",
      "type": "question",
      "answer_index": 1
    },
    {
      "id": "84b0e950-f399-4789-b744-1b63ba037706",
      "type": "question",
      "answer_index": [
        1,
        2
      ]
    },
    {
      "id": "310a4b9f-05d0-4d26-85f5-0d7411d4372e",
      "type": "image",
      "url": "http://example.org/1.jpg"
    },
    {
      "id": "01b9728f-564e-4ad1-97d0-ee38426909a8",
      "type": "video",
      "url": "http://example.org/2.mp4"
    }
  ]
}
Example Response
{
    "fb": "864230000000000000000",
    "id": "urn:authenticateit:review_doc:745047469332036",
    "linkedin": null,
    "status": "Thank you! We are processing information you provided. You will be granted coins once we approve it.",
    "status_i18n_id": "reviews-add_review-success",
    "twitter": null,
    "url": "https://reviews.shping.com/745047469332036"
}

Review Comments

Participant endpoints for comments require reviews_admin role.

Create Comment

POST /reviews-service/comments/:review_id
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
review_id url Required: Review Id
comment string Required: Text comment
Example Request
{
  "comment": "Some comment"
}
Example Response
{
    "comments": [
        {
            "id": "651d3802-164c-4328-a65e-0b08a4c901f8",
            "participant_id": "urn:authenticateit:participant:735879621218609",
            "text": "Some comment",
            "ts": "2020-12-16T14:35:02Z",
            "user_id": "urn:authenticateit:user:email:ethertest3@mailinator.com"
        },
        {
            "id": "19102d53-b62c-4108-ac2f-9678d41b9449",
            "participant_id": "urn:authenticateit:participant:735879621218609",
            "text": "test comment",
            "ts": "2020-12-15T16:09:44Z",
            "update_ts": "2020-12-16T14:19:23Z",
            "user_id": "urn:authenticateit:user:email:ethertest3@mailinator.com"
        }
    ]
}

Read Comments

GET /reviews-service/comments/:review_id
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
review_id url Required: Review Id
Example Response
{
    "comments": [
        {
            "id": "651d3802-164c-4328-a65e-0b08a4c901f8",
            "participant_id": "urn:authenticateit:participant:735879621218609",
            "text": "Some comment",
            "ts": "2020-12-16T14:35:02Z",
            "user_id": "urn:authenticateit:user:email:ethertest3@mailinator.com"
        },
        {
            "id": "19102d53-b62c-4108-ac2f-9678d41b9449",
            "participant_id": "urn:authenticateit:participant:735879621218609",
            "text": "test comment",
            "ts": "2020-12-15T16:09:44Z",
            "update_ts": "2020-12-16T14:19:23Z",
            "user_id": "urn:authenticateit:user:email:ethertest3@mailinator.com"
        }
    ]
}

Update Comment

PUT /reviews-service/comments/:review_id
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
review_id url Required: Review Id
comment_id string Required: Comment Id
comment string Required: Text comment
Example Request
{
 "comment_id": "19102d53-b62c-4108-ac2f-9678d41b9449", 
 "comment": "test comment"
}
Example Response
{
    "comments": [
        {
            "id": "651d3802-164c-4328-a65e-0b08a4c901f8",
            "participant_id": "urn:authenticateit:participant:735879621218609",
            "text": "Some comment",
            "ts": "2020-12-16T14:35:02Z",
            "user_id": "urn:authenticateit:user:email:ethertest3@mailinator.com"
        },
        {
            "id": "19102d53-b62c-4108-ac2f-9678d41b9449",
            "participant_id": "urn:authenticateit:participant:735879621218609",
            "text": "test comment",
            "ts": "2020-12-15T16:09:44Z",
            "update_ts": "2020-12-16T14:39:20Z",
            "user_id": "urn:authenticateit:user:email:ethertest3@mailinator.com"
        }
    ]
}

Delete Comments

PUT /reviews-service/comments/:review_id/delete
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
review_id url Required: Review Id
comment_ids list Required: Comment Ids
Example Request
{
    "comment_ids": ["19102d53-b62c-4108-ac2f-9678d41b9449"] 
}
Example Response
{
    "comments": [
        {
            "id": "651d3802-164c-4328-a65e-0b08a4c901f8",
            "participant_id": "urn:authenticateit:participant:735879621218609",
            "text": "Some comment",
            "ts": "2020-12-16T14:35:02Z",
            "user_id": "urn:authenticateit:user:email:ethertest3@mailinator.com"
        }
    ]
}

Export API

Get export types

GET /reviews-service/export/types
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
Example Response
[
    {
        "example_link": "https://cdn.shping.com/2022/5/30/e8f1328f-9a1d-46b9-9db0-c53d96c36ac7.csv",
        "id": "default_csv",
        "name": "Default template CSV"
    },
    {
        "example_link": "https://cdn.shping.com/2022/5/31/b2bc1c22-1831-456f-8f10-cf84f78b7c06.csv",
        "id": "yotpo_shopify_csv",
        "name": "Yotpo-Shopify template CSV"
    }
]

Create export task

POST /reviews-service/export/task
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
type string Required: Type id
location string Business location id. Required for type=yotpo_shopify_csv
filter_by string Filter by created or approved timestamp
ts_from datetime From ts
ts_to datetime To ts
Example Request
{
    "filter_by": "created",
    "ts_from": "2011-01-01T00:00:00Z",
    "ts_to": "2022-09-01T00:00:00Z",
    "type": "yotpo_shopify_csv",
    "location":"urn:authenticateit:business_location:9f4956c6-6f95-4cb7-9820-fd1b9fd952e3"
}
Example Response
{
    "created_by": "urn:authenticateit:user:email:system@authenticateit.com",
    "created_ts": "2022-05-31T05:13:42Z",
    "filter_by": "created",
    "id": "420179e1-6f49-4a39-ac53-c6ae672fefa0",
    "init_rows": 132,
    "location": "urn:authenticateit:business_location:9f4956c6-6f95-4cb7-9820-fd1b9fd952e3",
    "status": "pending",
    "ts_from": "2011-01-01T00:00:00Z",
    "ts_to": "2022-09-01T00:00:00Z",
    "type": "yotpo_shopify_csv"
}

Get export tasks

GET /reviews-service/export/tasks
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
offset non_neg_integer Offset
limit pos_integer Limit

Data list ordering is always by created_at desc

Example Response
{
    "count": 17,
    "data": [
        {
            "created_by": "urn:authenticateit:user:email:system@authenticateit.com",
            "created_ts": "2022-05-31T05:13:42Z",
            "filter_by": "created",
            "finish_ts": "2022-05-31T05:14:05Z",
            "id": "420179e1-6f49-4a39-ac53-c6ae672fefa0",
            "init_rows": 132,
            "link": "https://dev-cdn.shping.com/2022/5/31/420179e1-6f49-4a39-ac53-c6ae672fefa0.csv.zip",
            "location": "urn:authenticateit:business_location:9f4956c6-6f95-4cb7-9820-fd1b9fd952e3",
            "pid": "<0.4677.0>",
            "rows": 78,
            "start_ts": "2022-05-31T05:14:00Z",
            "status": "success",
            "ts_from": "2011-01-01T00:00:00Z",
            "ts_to": "2022-09-01T00:00:00Z",
            "type": "yotpo_shopify_csv"
        },
        {
            "created_by": "urn:authenticateit:user:email:system@authenticateit.com",
            "created_ts": "2022-05-31T01:17:55Z",
            "filter_by": "approved",
            "finish_ts": "2022-05-31T01:18:04Z",
            "id": "c882328b-6960-42c6-b107-b3bd2368a072",
            "init_rows": 132,
            "link": "https://dev-cdn.shping.com/2022/5/31/c882328b-6960-42c6-b107-b3bd2368a072.csv.zip",
            "location": null,
            "pid": "<0.4688.0>",
            "rows": 132,
            "start_ts": "2022-05-31T01:18:00Z",
            "status": "success",
            "ts_from": "2011-01-01T00:00:00Z",
            "ts_to": "2022-09-01T00:00:00Z",
            "type": "default_csv"
        },
    ]
}

results matching ""

    No results matching ""