Articles on: Developers

Review connections (developers)


Third-party reviews can be imported into Trustmary via review connections. These review connections can be managed via our API.

Review connection object



Attributes



id string
Unique identifier for the object.
slug string
User specified short name for the object.
title string
The title of the review connection.
source string
Which third-party service is used in the connection.
lang string
Language of the reviews.
targetId string
Unique identifier of target.
targetUrl string
URL of target.

Example



{
  "id": "12345",
  "slug": "my-hotel-1",
  "title": "My title for my hotel",
  "source": "airbng",
  "lang": "en",
  "targetId": "hotel-0001",
  "targetUrl": "https://airbnb.example.com/hotels/hotel-0001/"
}


Listing review connections



GET /review-connections


Returning


{
  "reviewConnections": [review_connection_objects]
}

Updating review connections



PATCH /review-connections/{slug or ID}


The review connection ID (as returned by POST or GET) can be used to access a review connection.

The following properties can be changed for a review connection:
slug
title

If not set in the POST body, the property will not be changed. E.g., to change just the slug the request body should look like this:

{
    "slug: "my-new-slug"
}


Adding new review connections



Review connections can be added by using a review source page URL or using explicit review service ID.

POST /review-connections


The URL is the same URL as you would use to browse the reviews on the external review service.

The title and the slug can be set when adding a connection. E.g. to add a new connection by URL, the request body shoud look like this:

{
  "title": "My hotel",
  "slug": "my-hotel",
  "targetUrl": "https://some-review-service.com/hotels/12345"
}


Alternatively, for some services it is required to use an ID or it might be more convenient in case you are already handling review page ID's. When using an ID, the source type must be known. The following request body is an example on how to add a Capterra source by ID.

{
  "source": "capterra",
  "targetId": "123456"
}


An optional lang parameter might be needed for some services. The response body will contain the system set ID for the added connection.

Removing review connections



DELETE /review-connections/{slug or ID}



Updated on: 28/02/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!