v1

latestOpenAPI 3.0.12026-07-243266138.0 KB
Endpoints

Get a list of reviews

This endpoint retrieves reviews for a specific channel, a set of channels or for your entire account.

The result set can be modified using a set of filters.

Query parameters can be added to the request, separated by &.

Conceptually, there are two types of categories for the query parameters: actual filter parameters on the one hand, channels, rating, submittedAfter and submittedBefore, and pagination parameters on the other, count, after and before. See our guide on paginating response data for more information.

Custom Widget Implementation: Please note the response may include rejected reviews when using a custom widget. To prevent these from appearing, filter out reviews with the status attribute set to REJECTED.

get/reviews

Query parameters

channelsstring[]

The list of channels for which the list of reviews will be returned.

Example: channels=chl-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxx1,chl-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxx2

afterstring

after is a review ID. The list of reviews in the response will only contain reviews submitted earlier than the review with this ID.

Example: rev-xxxxxxxa-yyyy-xxxx-yyyy-xxxxxxxxxxxx

beforestring

before is a review ID. The list of reviews in the response will only contain reviews submitted later than the review with this ID.

Example: rev-xxxxxxxb-yyyy-xxxx-yyyy-xxxxxxxxxxxx

submittedAfterstring

submittedAfter is a timestamp in the ISO 8601 and RFC3339 compliant format yyyy-MM-dd’T’HH:mm:ss.SSSZ. Check the glossary for examples of valid datetime formats. The list of reviews will only contain reviews submitted with a later timestamp.

Example: 2018-02-01T17:10:42.733Z

submittedBeforestring

submittedBefore is a timestamp in the ISO 8601 and RFC3339 compliant format yyyy-MM-dd’T’HH:mm:ss.SSSZ. Check the glossary for examples of valid datetime formats. The list of reviews will only contain reviews submitted with an earlier timestamp.

Example: 2018-02-01T17:10:42.733Z

countinteger

The desired number of customer reviews to be retrieved per page.

NB: This can be set to any number from 1 to 1000 with 1000 being the maximum number of records you can get per a page

ratinginteger[]

A comma-separated list of star ratings to be retrieved. If not set, all reviews are listed.

Example: 1, 2, 5

statusstring[]

A comma-separated list of statuses to be retrieved. If not set, all reviews are listed.

The statuses you can filter for are:

  • APPROVED
  • MODERATION
  • REJECTED

Example: APPROVED, MODERATION

See our glossary entry for more information on review statuses.

typestring[]

A comma-separated list of review types to be retrieved. If not set, all reviews are listed.

The review types are:

  • SERVICE_REVIEW
  • PRODUCT_REVIEW

Example: PRODUCT_REVIEW

See our glossary entry for more information on review states.

hasReplyboolean

Reduces the list of reviews to only match reviews that either have been replied to or not. If not set, all reviews are listed.

Example: true

additionalInformationstring[]

A comma-separated list of additional pieces of information to be retrieved with the review.

If this property is not set, none of the of additional information are included in the review.

Currently there are the following valid additional information types:

  • VETO, which holds information about a veto by our customer
  • ATTACHMENTS, which hold information about file attachments for this review

Example: [VETO]

ignoreStatementsboolean

Filters the list to ignore statements. Default is true.

querystring

A full-text search query that is matched against the order reference and email properties.

skustring[]

A comma-separated list of product's SKUs. Be aware, that this parameter does only make sense for product reviews.

orderBystring

Specify the date to sort the returned list of reviews by. Possible options:

  • editedAt: This is the date when the consumer last changed the review.It sorts the reviews in descending order using the lastEditedAt date
  • updatedAt:This is the date when the review was last updated. It sorts the reviews in descending order using the updatedAt date
  • submittedAt: This is the date when the review was created by the consumer. Reviews will be sorted by default in descending order using the submittedAt date if the orderBy parameter is not set or set to a non existing value.

Headers

Authorizationstring required

An OAuth2 authorization header with an access token, see OAuth2

Response

The list of reviews for the given channels or all channels.

totalElementsinteger required

Deprecated. Use review/count. The value will return 0.

Example response

{
  "paging": {
    "count": 10,
    "cursor": {
      "before": "rev-xxxxxxxa-yyyy-xxxx-yyyy-xxxxxxxxxxxx",
      "after": "rev-xxxxxxxb-yyyy-xxxx-yyyy-xxxxxxxxxxxx"
    },
    "links": {
      "previous": "https://api.etrusted.com/channels/{channelId}/customer-reviews?count=10&before=rev-xxxxxxxa-yyyy-xxxx-yyyy-xxxxxxxxxxxx",
      "next": "https://api.etrusted.com/channels/{channelId}/customer-reviews?count=10&after=rev-xxxxxxxb-yyyy-xxxx-yyyy-xxxxxxxxxxxx"
    }
  },
  "items": [
    {
      "_object": "CustomerReview",
      "id": "rev-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx",
      "accountRef": "acc-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx",
      "channelRef": "chl-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx",
      "inviteRef": "inv-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx",
      "rating": 4.6,
      "title": "Great experience",
      "comment": "Everything went well. Very helpful staff!",
      "createdAt": "2018-02-01T17:09:41.790Z",
      "updatedAt": "2018-02-01T17:09:41.790Z",
      "submittedAt": "2018-02-01T17:09:41.790Z",
      "state": "APPROVED",
      "reply": {
        "createdAt": "2018-02-01T17:10:42.733Z",
        "updatedAt": "2018-02-01T17:11:33.121Z",
        "comment": "We appreciate your feedback."
      },
      "customer": {
        "firstName": "John",
        "lastName": "Doe",
        "fullName": "John Doe",
        "email": "john.doe@example.com",
        "mobile": "+123456789"
      },
      "transaction": {
        "reference": "ORDER-12792",
        "date": "2018-01-04T12:09:50.722Z"
      },
      "event": {
        "id": "evt-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx",
        "type": "checkout"
      },
      "metadata": {
        "customParam1": "customVal1",
        "customParam2": "customVal2"
      },
      "surveyData": {
        "responseParam1": "responseVal1",
        "responseParam2": "responseVal2"
      },
      "questionnaire": {
        "id": "qre-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx",
        "locale": "en_GB",
        "templateRef": "qrt-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx"
      },
      "additionalInformation": {
        "veto": {
          "createdAt": "2018-02-01T17:09:41.790Z",
          "comment": "Example comment",
          "ticketId": "123123"
        },
        "attachments": {
          "images": [
            {
              "id": "atc-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx",
              "extensions": "png",
              "urlOriginal": "https://attachments.etrusted.koeln/attachments/id/more/directories/image.png",
              "pathOriginal": "/attachments/id/more/directories/image.png",
              "pathThumbnail": "/attachments/id/more/directories/image.png",
              "pathLarge": "/attachments/id/more/directories/image.png"
            }
          ]
        },
        "originalReview": {
          "title": "Great experience",
          "comment": "Everything went well. Very helpful staff!",
          "reply": {
            "createdAt": "2018-02-01T17:10:42.733Z",
            "updatedAt": "2018-02-01T17:11:33.121Z",
            "comment": "We appreciate your feedback."
          }
        }
      },
      "product": {
        "id": "prt-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx",
        "sku": "1234-TS-WH-M",
        "mpn": "23687778",
        "name": "Specialbrand T-Shirt White M",
        "url": "http://www.specialbrandshop.com/article123-TS-WH-M/",
        "imageUrl": "https://www.specialbrandshop.com/article123-TS-WH-M/image.jpg",
        "brand": "specialbrand"
      },
      "editedAt": "2018-02-01T17:09:41.790Z",
      "originalReview": {
        "comment": "It was a very good experience. The service team is very friendly and the prices are good. I can only recommend this store.",
        "title": "It was a very good experience.",
        "reply": {
          "replyComment": "We appreciate your feedback.",
          "replyCreatedAt": "2018-02-01T17:10:42.733Z",
          "replyUpdatedAt": "2018-02-01T17:11:33.121Z"
        }
      }
    }
  ]
}