Go To Top

Product Reviews API

Create a new comment for a given conversation. The comment is appended to the list of existing comments.

POST
https://api.trustpilot.com/v1/private/conversations/{conversationId}/comments
Parameters
conversationId, Required String
The ID of the conversation to create a comment for
Example: …/v1/private/conversations/507f191e810c19729de860ea/comments

Request
{
  "content": "Thank you for you kind words, we really appreciate it."
}
Response
{
  "content": "Thank you for you kind words, we really appreciate it.",
  "commentId": "507f191e810c19729de860ea",
  "createdAt": "2013-09-07T13:37:00",
  "author": {
    "type": "businessUser",
    "id": "507f191e810c19729de860ea"
  }
}

Prepares the review for participating in a conversation by issuing a conversation ID.

POST
https://api.trustpilot.com/v1/private/product-reviews/{reviewId}/create-conversation
Parameters
reviewId, Required String
The id of the product review
Example: …/v1/private/product-reviews/507f191e810c19729de860ea/create-conversation

Response
{
  "conversationId": "507f191e810c19729de860ea"
}

Given information about the consumer and the product(s) purchased, get a link that can be sent to the consumer to request reviews. Note that the products should preferably be specified as product ids (see the Product API). Alternativly they can be specified directly in the products fields, but this is considered obsolete and will be removed in future versions of the API. It is only possible to use one of these methods for specifying product information.

POST
https://api.trustpilot.com/v1/private/product-reviews/business-units/{businessUnitId}/invitation-links
Parameters
businessUnitId, Required String

Example: …/v1/private/product-reviews/business-units/5408d4b9065464000578ca81/invitation-links

Request
{
  "referenceId": "123ABC",
  "locale": "en-US",
  "products": [
    {
      "sku": "ABC-1234",
      "name": "Metal Toy Car",
      "mpn": "7TX1641",
      "imageUrl": "http://www.mycompanystore.com/products/images/12345.jpg",
      "productUrl": "http://www.mycompanystore.com/products/12345.htm",
      "gtin": "01234567890",
      "brand": "Acme"
    }
  ],
  "productIds": [
    "507f191e810c19729de860ea",
    "507f191e810c19729de860eb",
    "507f191e810c19729de860ec"
  ],
  "consumer": {
    "email": "johndoe@somewhere.com",
    "name": "John Doe"
  },
  "redirectUri": "https://www.example.com"
}
Response
{
  "reviewUrl": "https://products.trustpilot.com/evaluate/i377afKxa7abY",
  "reviewLinkId": "i9tafKx7abY"
}

Get a single comment by id.

GET
https://api.trustpilot.com/v1/private/conversations/{conversationId}/comments/{commentId}
Parameters
conversationId, Required String
The ID of the conversation the comment to retrieve is part of
Example: …/v1/private/conversations/507f191e810c19729de860ea/comments/{commentId}

commentId, Required String
The ID of the comment to retrieve
Example: …/v1/private/conversations/{conversationId}/comments/507f191e810c19729de860ea

Response
{
  "content": "Thank you for you kind words, we really appreciate it.",
  "commentId": "507f191e810c19729de860ea",
  "createdAt": "2013-09-07T13:37:00",
  "author": {
    "type": "businessUser",
    "id": "507f191e810c19729de860ea"
  }
}

Get a conversation and related comments by id.

GET
https://api.trustpilot.com/v1/private/conversations/{conversationId}
Parameters
conversationId, Required String
The ID of the conversation to retrieve
Example: …/v1/private/conversations/507f191e810c19729de860ea

Response
{
  "businessUnitId": "507f191e810c19729de860ea",
  "consumerId": "507f191e810c19729de860ea",
  "sourceId": "507f191e810c19729de860ea",
  "comments": [
    {
      "content": "Thank you for you kind words, we really appreciate it.",
      "commentId": "507f191e810c19729de860ea",
      "createdAt": "2013-09-07T13:37:00",
      "author": {
        "type": "businessUser",
        "id": "507f191e810c19729de860ea"
      }
    }
  ],
  "source": "Product reviews",
  "state": "public",
  "id": "507f191e810c19729de860ea"
}

This method allows you to get imported product reviews by business unit id, SKUs and language. It includes review content, date of creation of review, individual star rating and display name of the consumer who wrote the review. It is possible to paginate the results.

GET
Authentication: API Key
https://api.trustpilot.com/v1/product-reviews/business-units/{businessUnitId}/imported-reviews
Parameters
businessUnitId, Required String

Example: …/v1/product-reviews/business-units/507f191e810c19729de860ea/imported-reviews

page, Optional Integer
The page to retrieve. If the page number requested is higher than the available number of pages an empty array will be returned.
Constraints: The allowed range is minimum: 1, maximum: 2147483647
Example: ?page=1

perPage, Optional Integer
The number of reviews to retrieve per page.
Constraints: The allowed range is minimum: 1, maximum: 100
Default value: 20
Example: ?perPage=3

sku, Required Array
The sku of the product.
Example: ?sku=ABCD-1234
* provide multiple values using comma seperation

language, Optional String
Filter reviews by language.
Example: ?language=en

Response
{
  "productReviews": [
    {
      "content": "This product was nice, but slightly too soft.",
      "language": "en",
      "consumer": {
        "name": "John Doe"
      },
      "stars": 4,
      "createdAt": "2013-09-07T13:37:00"
    }
  ],
  "links": [
    {
      "href": "<Url for the resource>",
      "method": "<Http method for the resource>",
      "rel": "<Description of the relation>"
    }
  ]
}

Get a summary of imported product reviews for a single or multiple SKUs. The summary contains information about stars average, distribution and count.

GET
Authentication: API Key
https://api.trustpilot.com/v1/product-reviews/business-units/{businessUnitId}/imported-reviews-summaries
Parameters
businessUnitId, Required String
The id of the business unit.
Example: …/v1/product-reviews/business-units/507f191e810c19729de860ea/imported-reviews-summaries

sku, Required Array
The SKU of the product, or multiple comma-separated SKUs (which will be summarized together).
Example: ?sku=ABCD-1234
* provide multiple values using comma seperation

Response
{
  "starsAverage": 3.1,
  "numberOfReviews": {
    "threeStars": 2,
    "oneStar": 2,
    "twoStars": 3,
    "fiveStars": 2,
    "total": 14,
    "fourStars": 5
  },
  "links": [
    {
      "href": "<Url for the resource>",
      "method": "<Http method for the resource>",
      "rel": "<Description of the relation>"
    }
  ]
}

Gets a single private product review. This method includes private information such as consumer e-mail and reference id.

GET
https://api.trustpilot.com/v1/private/product-reviews/{reviewId}
Parameters
reviewId, Required String
The id of the product review
Example: …/v1/private/product-reviews/507f191e810c19729de860ea

Response
{
  "conversationId": "507f191e810c19729de860ea",
  "product": {
    "sku": "ABC-1234",
    "name": "Metal Toy Car",
    "mpn": "7TX1641",
    "productImages": [
      {
        "url": "http://www.mycompanystore.com/products/images/12345.jpg",
        "type": "100pxWide"
      }
    ],
    "brand": "Acme",
    "productUrl": "http://www.mycompanystore.com/products/12345.htm",
    "gtin": "01234567890",
    "id": "507f191e810c19729de860ea"
  },
  "referenceId": "123ABC",
  "businessUnitId": "507f191e810c19729de860ea",
  "language": "en",
  "locale": "en-US",
  "hasModerationHistory": true,
  "redirectUri": "https://www.example.com",
  "content": "This product was nice, but slightly too soft.",
  "state": "published",
  "stars": 4,
  "updatedAt": "2013-09-07T13:37:00",
  "consumer": {
    "id": "507f191e810c19729de860ea",
    "name": "John Doe",
    "email": "johndoe@somewhere.com"
  },
  "id": "507f191e810c19729de860ea",
  "createdAt": "2013-09-07T13:37:00"
}

Given a list of SKUs or product urls return a list of product reviews. This method includes private information such as consumer e-mail and reference id. By default only published reviews are returned. To get reviews with other states, provide a list in the state field. Pagination is used to retrieve all results.

GET
https://api.trustpilot.com/v1/private/product-reviews/business-units/{businessUnitId}/reviews
Parameters
businessUnitId, Required String

Example: …/v1/private/product-reviews/business-units/5408d4b9065464000578ca81/reviews

page, Optional Integer
The page to retrieve. If the page number requested is higher than the available number of pages an empty array will be returned.
Constraints: The allowed range is minimum: 1, maximum: 2147483647
Example: ?page=1

perPage, Optional Integer
The number of reviews to retrieve per page.
Constraints: The allowed range is minimum: 1, maximum: 100
Default value: 20
Example: ?perPage=3

sku, Optional Array
Filter reviews by product Stock-Keeping Unit (SKU) identifier
Example: ?sku=ABCD-1234
* provide multiple values using comma seperation

language, Optional String
Filter reviews by language.
Example: ?language=en

state, Optional Array
Which reviews to retrieve according to their review state. Default is Published.
Constraints: Allowed values are published, unpublished, underModeration, archived
Default value: [ "published" ]
Example: ?state=published
* provide multiple values using comma seperation

Response
{
  "productReviews": [
    {
      "conversationId": "507f191e810c19729de860ea",
      "product": {
        "sku": "ABC-1234",
        "name": "Metal Toy Car",
        "mpn": "7TX1641",
        "productImages": [
          {
            "url": "http://www.mycompanystore.com/products/images/12345.jpg",
            "type": "100pxWide"
          }
        ],
        "brand": "Acme",
        "productUrl": "http://www.mycompanystore.com/products/12345.htm",
        "gtin": "01234567890",
        "id": "507f191e810c19729de860ea"
      },
      "referenceId": "123ABC",
      "businessUnitId": "507f191e810c19729de860ea",
      "language": "en",
      "locale": "en-US",
      "hasModerationHistory": true,
      "redirectUri": "https://www.example.com",
      "content": "This product was nice, but slightly too soft.",
      "state": "published",
      "stars": 4,
      "updatedAt": "2013-09-07T13:37:00",
      "consumer": {
        "id": "507f191e810c19729de860ea",
        "name": "John Doe",
        "email": "johndoe@somewhere.com"
      },
      "id": "507f191e810c19729de860ea",
      "createdAt": "2013-09-07T13:37:00"
    }
  ],
  "total": 0,
  "links": [
    {
      "href": "<Url for the resource>",
      "method": "<Http method for the resource>",
      "rel": "<Description of the relation>"
    }
  ]
}

This method allows you to get business unit product reviews for SKUs and / or productUrls. Note: Even though productUrl and sku are listed as optional parameters at least one of them must be specified. It includes review content, date of creation of review, individual star rating, id and display name of the consumer who wrote the review. Pagination and filtering reviews by language is also possible.

GET
Authentication: API Key
https://api.trustpilot.com/v1/product-reviews/business-units/{businessUnitId}/reviews
Parameters
businessUnitId, Required String

Example: …/v1/product-reviews/business-units/5408d4b9065464000578ca81/reviews

page, Optional Integer
The page to retrieve. If the page number requested is higher than the available number of pages an empty array will be returned.
Constraints: The allowed range is minimum: 1, maximum: 2147483647
Example: ?page=1

perPage, Optional Integer
The number of reviews to retrieve per page.
Constraints: The allowed range is minimum: 1, maximum: 100
Default value: 20
Example: ?perPage=3

productUrl, Optional Array
The url of the product. Optional only if sku is provided.
Example: ?productUrl=http%3A%2F%2Fwww.mycompanystore.com%2Fproducts%2Fimages%2F12345.jpg
* provide multiple values using comma seperation

sku, Optional Array
The sku of the product. Optional only if productUrl is provided.
Example: ?sku=ABCD-1234
* provide multiple values using comma seperation

language, Optional String
Filter reviews by language.
Example: ?language=en

Response
{
  "productReviews": [
    {
      "content": "This product was nice, but slightly too soft.",
      "language": "en",
      "consumer": {
        "displayName": "John Doe",
        "id": "507f191e810c19729de860ea"
      },
      "stars": 4,
      "createdAt": "2013-09-07T13:37:00"
    }
  ],
  "links": [
    {
      "href": "<Url for the resource>",
      "method": "<Http method for the resource>",
      "rel": "<Description of the relation>"
    }
  ]
}

Get a list of summaries of product reviews for a business unit. The summary contains information about stars average, distribution and count. Pagination is used to retrieve all results.

GET
https://api.trustpilot.com/v1/private/product-reviews/business-units/{businessUnitId}/summaries
Parameters
businessUnitId, Required String
The id of the business unit
Example: …/v1/private/product-reviews/business-units/507f191e810c19729de860ea/summaries

page, Optional Integer
The page to retrieve. If the page number requested is higher than the available number of pages an empty array will be returned.
Constraints: The allowed range is minimum: 1, maximum: 2147483647
Example: ?page=1

perPage, Optional Integer
The number of summaries to retrieve per page.
Constraints: The allowed range is minimum: 1, maximum: 1000
Default value: 1000
Example: ?perPage=3

Response
{
  "summaries": [
    {
      "sku": "ABC-1234",
      "starsAverage": 3.1,
      "numberOfReviews": {
        "threeStars": 2,
        "oneStar": 2,
        "twoStars": 3,
        "fiveStars": 2,
        "total": 14,
        "fourStars": 5
      }
    }
  ],
  "links": [
    {
      "href": "<Url for the resource>",
      "method": "<Http method for the resource>",
      "rel": "<Description of the relation>"
    }
  ]
}

Get a summary of product reviews for a single or multiple SKU(s) or productUrl(s). Note: Even though productUrl and sku are listed as optional parameters at least one of them must be specified. If both sku and productUrl are specified the productUrl is ignored and a search will be made only on the basis of the sku. The summary contains information about stars average, distribution and count.

GET
Authentication: API Key
https://api.trustpilot.com/v1/product-reviews/business-units/{businessUnitId}
Parameters
businessUnitId, Required String
The id of the business unit.
Example: …/v1/product-reviews/business-units/507f191e810c19729de860ea

productUrl, Optional Array
The url of the product. Mandatory only if no sku is provided, else ignored.
Example: ?productUrl=http%3A%2F%2Fwww.mycompanystore.com%2Fproducts%2Fimages%2F12345.jpg
* provide multiple values using comma seperation

sku, Optional Array
A single or multiple comma-separated SKUs of the product(s). Optional only if productUrl is provided.
Example: ?sku=ABCD-1234
* provide multiple values using comma seperation

Response
{
  "starsAverage": 3.1,
  "numberOfReviews": {
    "threeStars": 2,
    "oneStar": 2,
    "twoStars": 3,
    "fiveStars": 2,
    "total": 14,
    "fourStars": 5
  },
  "links": [
    {
      "href": "<Url for the resource>",
      "method": "<Http method for the resource>",
      "rel": "<Description of the relation>"
    }
  ]
}

Get a public conversation and related comments by id.

GET
Authentication: API Key
https://api.trustpilot.com/v1/conversations/{conversationId}
Parameters
conversationId, Required String
The ID of the conversation to retrieve
Example: …/v1/conversations/507f191e810c19729de860ea

Response
{
  "consumerId": "507f191e810c19729de860ea",
  "id": "507f191e810c19729de860ea",
  "comments": [
    {
      "content": "Thank you for you kind words, we really appreciate it.",
      "commentId": "507f191e810c19729de860ea",
      "createdAt": "2013-09-07T13:37:00",
      "author": {
        "type": "businessUser",
        "id": "507f191e810c19729de860ea"
      }
    }
  ],
  "businessUnitId": "507f191e810c19729de860ea"
}

Set the conversation state to either public or private. If set to private no third parties will see the conversation.

POST
https://api.trustpilot.com/v1/private/conversations/{conversationId}/state
Parameters
conversationId, Required String
The ID of the conversation to change the state for
Example: …/v1/private/conversations/507f191e810c19729de860ea/state

Request
{
  "state": "private"
}