Reviews

Here you find all available endpoints related to Swell CX reviews. These endpoints are protected and you'll need an API Key.


In order to use the GET and POST requests, add to the header the following:

Key Value
Content-Type application/json
Accept application/json

GET /api/v1/reviews

Parameters

Param Required Description
token Required The API token generated throught UI interface on swell platform.
team_id Optional Filter reviews to show only those from this team_id. Values: use Integer or array
location_id Optional Filter reviews to show only those from this location_id. Values: use Integer or array
rating Optional Filter reviews to show only those from this rating, specified as an integer from 1 to 5.
from_date Optional Filter reviews by starting date. Format: yyyy-mm-dd.
to_date Optional Filter reviews by an end date. Format: yyyy-mm-dd. Default now.
page Optional Specify the page you would like returned in a request. Minimum value: 1
per_page Optional Specify the number of records to return in one request, specified as an integer from 1 to 100. Default 15.

Examples


Request Example

/api/v1/reviews?team_id=123&token=3lxeh7XMElKc97lbPNwWKNEBOw9Nzuur7ntfoKwBzh4UboVos0qU5qhFh4nT


Response

{
    "data": [
        {
            "id": 25,
            "rating": 3,
            "body": "I shall remember it in her pocket) till she was about a thousand times as large as himself, and this Alice thought over all she could remember them, all these strange Adventures of hers would, in.",
            "origin": "software_advice",
            "reviewer_name": "Mr. Kip Donnelly PhD",
            "review_date": "2019-05-20 19:09:02",
            "recommended": null,
            "url": null,
            "invite": {
                "id": 93,
                "status": "opened",
                "send_at": "2019-05-08 19:56:58",
                "accepted_at": "2019-05-23 18:42:00",
                "rejected_at": "",
                "image": "http://swell.test/storage/https://lorempixel.com/640/480/?65591"
            },
            "location": {
                "id": 5,
                "name": "Turner, Stroman and Wisozk",
                "address": "18601 Rosenbaum Pass Suite 357\nWest Kathleen, NH 41226",
                "latitude": -5.463232,
                "longitude": -104.14239
            }
        },
        {
            "id": 7,
            "rating": 2,
            "body": "Queen to-day?' 'I should have liked teaching it tricks very much, if--if I'd only been the whiting,' said the Mock Turtle at last, they must be kind to them,' thought Alice, 'shall I NEVER get any.",
            "origin": "yelp",
            "reviewer_name": "Pearline Tillman",
            "review_date": "2019-05-04 10:11:00",
            "recommended": null,
            "url": "?hrid=",
            "invite": {
                "id": 26,
                "status": "opened",
                "send_at": "2019-05-09 06:05:05",
                "accepted_at": "2019-05-28 02:34:19",
                "rejected_at": "",
                "image": "http://swell.test/storage/https://lorempixel.com/640/480/?45965"
            },
            "location": {
                "id": 2,
                "name": "West Ltd",
                "address": "3652 Gutmann Plains\nKundemouth, FL 04261-7764",
                "latitude": 53.078174,
                "longitude": 19.654471
            }
        }
    ],
    "links": {
        "first": "http://swell.test/api/v1/reviews?page=1",
        "last": "http://swell.test/api/v1/reviews?page=3",
        "prev": null,
        "next": "http://swell.test/api/v1/reviews?page=2"
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "http://swell.test/api/v1/reviews",
        "per_page": 15,
        "to": 2,
        "total": 2
    }
}