Go To Top

Invitation API

This API endpoint triggers email invitation(s). You can create both service review invitations and product review invitations using this endpoint. If you only want to create a service review invitation, you can omit the productReviewInvitation section. When you specify the productReviewInvitation you must include either the products or the productSkus field - but not both. If you include the productSkus field, you must upload your product catalog before you schedule invitations. The preferredSendTime must be in UTC if specified. If preferredSendTime is specified for both the serviceReviewInvitation and productReviewInvitation, then the serviceReviewInvitation must precede the productReviewInvitation.

POST
https://invitations-api.trustpilot.com/v1/private/business-units/{businessUnitId}/email-invitations
Parameters
businessUnitId, Required String
The ID of the business unit.
Example: …/v1/private/business-units/{businessUnitId}/email-invitations

Request
{
  "consumerEmail": "john.doe@trustpilot.com",
  "referenceNumber": "inv00001",
  "replyTo": "john.doe@trustpilot.com",
  "productReviewInvitation": {
    "productSkus": [
      "sku1",
      "sku2"
    ],
    "preferredSendTime": "2013-09-07T13:37:00",
    "products": [
      {
        "sku": "ABC-1234",
        "name": "Metal Toy Car",
        "mpn": "7TX1641",
        "brand": "ACME",
        "productUrl": "http://www.mycompanystore.com/products/12345.htm",
        "gtin": "01234567890",
        "imageUrl": "http://www.mycompanystore.com/products/images/12345.jpg"
      }
    ],
    "redirectUri": "http://trustpilot.com",
    "templateId": "507f191e810c19729de860ea"
  },
  "consumerName": "John Doe",
  "locale": "en-US",
  "senderEmail": "john.doe@trustpilot.com",
  "serviceReviewInvitation": {
    "preferredSendTime": "2013-09-07T13:37:00",
    "redirectUri": "http://trustpilot.com",
    "tags": [
      "tag1",
      "tag2"
    ],
    "templateId": "507f191e810c19729de860ea"
  },
  "locationId": "ABC123",
  "senderName": "John Doe"
}

When providing a list of email addresses, all invitations data related to the specified consumer email addresses will be deleted. When providing a date, all invitations data older than the specified date will be deleted. It is not possible to specify a list of email addresses and a date at the same time. This is not reversible.

POST
https://invitations-api.trustpilot.com/v1/private/business-units/{businessUnitId}/invitation-data/delete
Parameters
businessUnitId, Required String
The ID of the business unit.
Example: …/v1/private/business-units/{businessUnitId}/invitation-data/delete

Request
{
  "deleteOlderThan": "2013-09-07T13:37:00",
  "customerEmails": [
    "joe@example.com",
    "jane@example.com"
  ]
}

Generate a unique invitation link that can be sent to a consumer by email or website. Use the request parameter called redirectURI to take the user to a product review link after the user has left a service review.

POST
https://invitations-api.trustpilot.com/v1/private/business-units/{businessUnitId}/invitation-links
Parameters
businessUnitId, Required String
The ID of the business unit.
Example: …/v1/private/business-units/{businessUnitId}/invitation-links

Request
{
  "referenceId": "inv00001",
  "name": "John Doe",
  "tags": [
    "tag1",
    "tag2"
  ],
  "locale": "en-US",
  "email": "john.doe@trustpilot.com",
  "redirectUri": "http://trustpilot.com"
}
Response
{
  "url": "https://www.trustpilot.com/evaluate-link/9ee95945f2aa3a748301efdc6b8b51d7",
  "id": "9ee95945f2aa3a748301efdc6b8b51d7"
}

Returns a list of ID and Names of the templates available to be used in invitations. Includes both default/optimized and custom templates.

GET
https://invitations-api.trustpilot.com/v1/private/business-units/{businessUnitId}/templates
Parameters
businessUnitId, Required String
The ID of the business unit.
Example: …/v1/private/business-units/{businessUnitId}/templates

Response
{
  "templates": [
    {
      "isDefaultTemplate": true,
      "locale": "da-DK",
      "type": "ServiceReview",
      "id": "507f191e810c19729de860ea",
      "name": "Standard template for English"
    }
  ]
}