> ## Documentation Index
> Fetch the complete documentation index at: https://docs.corsair.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Trustpilot API reference

> API reference for the Trustpilot plugin in Corsair: every `trustpilot.api.*` operation with its input and output types, taken from the plugin's Zod schemas.

> [!NOTE]
>
> **New to Corsair?** See [API access](https://docs.corsair.dev/concepts/api.md), [authentication](https://docs.corsair.dev/concepts/auth.md), and [error handling](https://docs.corsair.dev/concepts/error-handling).

## Business Units

### allReviews

`businessUnits.allReviews`

Page through public business unit reviews without private contact data

**Risk:** `read`

```ts theme={null}
await corsair.trustpilot.api.businessUnits.allReviews({ businessUnitId: '507f191e810c19729de860ea' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessUnitId` | `string` | Yes | — |
| `pageToken` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `reviews` | `object[]` | Yes | — |
| `nextPageToken` | `string \| null` | No | — |

> [accordion] reviews full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   stars?: number | null,
>   title?: string | null,
>   text?: string | null,
>   language?: string | null,
>   createdAt?: string | null,
>   updatedAt?: string | null,
>   experiencedAt?: string | null,
>   isVerified?: boolean,
>   numberOfLikes?: number,
>   consumer?: {
>     id?: string | null,
>     displayName?: string | null,
>     displayLocation?: string | null,
>     numberOfReviews?: number | null,
>     links?: {
>       href: string | null,
>       method: string | null,
>       rel: string | null
>     }[]
>   },
>   companyReply?: {
>     text: string | null,
>     createdAt: string | null,
>     updatedAt?: string | null
>   } | null,
>   links?: {
>     href: string | null,
>     method: string | null,
>     rel: string | null
>   }[]
> }[]
> ```

***

### customerGuarantee

`businessUnits.customerGuarantee`

Get customer guarantee content for a business unit

**Risk:** `read`

```ts theme={null}
await corsair.trustpilot.api.businessUnits.customerGuarantee({ businessUnitId: '507f191e810c19729de860ea' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessUnitId` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `links` | `object[]` | No | — |
| `header` | `string` | Yes | — |
| `teaser` | `string` | Yes | — |
| `body` | `string` | Yes | — |
| `display` | `boolean` | Yes | — |
| `image` | `object` | Yes | — |

> [accordion] links full type
>
> ```ts theme={null}
> {
>   href: string | null,
>   method: string | null,
>   rel: string | null
> }[]
> ```

> [accordion] image full type
>
> ```ts theme={null}
> {
>   image184x0: {
>     url: string,
>     width: string
>   }
> }
> ```

***

### find

`businessUnits.find`

Find a public business unit by domain name

**Risk:** `read`

```ts theme={null}
await corsair.trustpilot.api.businessUnits.find({ name: 'shop.example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `displayName` | `string \| null` | No | — |
| `websiteUrl` | `string \| null` | No | — |
| `country` | `string \| null` | No | — |
| `status` | `string \| null` | No | — |
| `numberOfReviews` | `object \| null` | No | — |
| `score` | `object \| null` | No | — |
| `links` | `object[]` | No | — |

> [accordion] numberOfReviews full type
>
> ```ts theme={null}
> {
>   total: number,
>   usedForTrustScoreCalculation?: number,
>   oneStar?: number,
>   twoStars?: number,
>   threeStars?: number,
>   fourStars?: number,
>   fiveStars?: number
> } | null
> ```

> [accordion] score full type
>
> ```ts theme={null}
> {
>   trustScore?: number | null,
>   stars?: number | null
> } | null
> ```

> [accordion] links full type
>
> ```ts theme={null}
> {
>   href: string | null,
>   method: string | null,
>   rel: string | null
> }[]
> ```

***

### get

`businessUnits.get`

Get a business unit public profile and TrustScore

**Risk:** `read`

```ts theme={null}
await corsair.trustpilot.api.businessUnits.get({ businessUnitId: '507f191e810c19729de860ea' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessUnitId` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `displayName` | `string \| null` | No | — |
| `websiteUrl` | `string \| null` | No | — |
| `country` | `string \| null` | No | — |
| `status` | `string \| null` | No | — |
| `numberOfReviews` | `object \| null` | No | — |
| `score` | `object \| null` | No | — |
| `links` | `object[]` | No | — |

> [accordion] numberOfReviews full type
>
> ```ts theme={null}
> {
>   total: number,
>   usedForTrustScoreCalculation?: number,
>   oneStar?: number,
>   twoStars?: number,
>   threeStars?: number,
>   fourStars?: number,
>   fiveStars?: number
> } | null
> ```

> [accordion] score full type
>
> ```ts theme={null}
> {
>   trustScore?: number | null,
>   stars?: number | null
> } | null
> ```

> [accordion] links full type
>
> ```ts theme={null}
> {
>   href: string | null,
>   method: string | null,
>   rel: string | null
> }[]
> ```

***

### headerImage

`businessUnits.headerImage`

Get a business unit profile-header image URL

**Risk:** `read`

```ts theme={null}
await corsair.trustpilot.api.businessUnits.headerImage({ businessUnitId: '507f191e810c19729de860ea' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessUnitId` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `headerUrl` | `string \| null` | Yes | — |

***

### listCategories

`businessUnits.listCategories`

List the categories associated with a business unit

**Risk:** `read`

```ts theme={null}
await corsair.trustpilot.api.businessUnits.listCategories({ businessUnitId: '507f191e810c19729de860ea', country: 'GB' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessUnitId` | `string` | Yes | — |
| `country` | `string` | No | — |
| `locale` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `categories` | `object[]` | Yes | — |
| `predictedTopCategory` | `object` | No | — |

> [accordion] categories full type
>
> ```ts theme={null}
> {
>   categoryId: string,
>   displayName: string,
>   name: string,
>   isPrimary?: boolean,
>   source?: string,
>   relevance?: number
> }[]
> ```

> [accordion] predictedTopCategory full type
>
> ```ts theme={null}
> {
>   categoryId: string,
>   displayName: string,
>   name: string,
>   isPrimary?: boolean,
>   source?: string,
>   relevance?: number
> }
> ```

***

### logo

`businessUnits.logo`

Get a business unit or location logo URL

**Risk:** `read`

```ts theme={null}
await corsair.trustpilot.api.businessUnits.logo({ businessUnitId: '507f191e810c19729de860ea' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessUnitId` | `string` | Yes | — |
| `locationId` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `links` | `object[]` | No | — |
| `logoUrl` | `string \| null` | Yes | — |

> [accordion] links full type
>
> ```ts theme={null}
> {
>   href: string | null,
>   method: string | null,
>   rel: string | null
> }[]
> ```

***

### privateReviews

`businessUnits.privateReviews`

List private business unit reviews and customer details

**Risk:** `read`

```ts theme={null}
await corsair.trustpilot.api.businessUnits.privateReviews({ businessUnitId: '507f191e810c19729de860ea', page: 1, perPage: 10 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessUnitId` | `string` | Yes | — |
| `stars` | `number[]` | No | — |
| `language` | `string[]` | No | — |
| `page` | `number` | No | — |
| `internalLocationId` | `string` | No | — |
| `externalLocationIds` | `string` | No | — |
| `noLocation` | `boolean` | No | — |
| `perPage` | `number` | No | — |
| `orderBy` | `(createdat.asc \| createdat.desc \| stars.asc \| stars.desc)[]` | No | — |
| `tagGroup` | `string` | No | — |
| `tagValue` | `string` | No | — |
| `ignoreTagValueCase` | `boolean` | No | — |
| `responded` | `boolean` | No | — |
| `referenceId` | `string` | No | — |
| `referralEmail` | `string` | No | — |
| `reported` | `boolean` | No | — |
| `startDateTime` | `string` | No | — |
| `endDateTime` | `string` | No | — |
| `source` | `string` | No | — |
| `username` | `string` | No | — |
| `findReviewer` | `contacted \| notContacted` | No | — |

Private reviews can include consumer email addresses, reference IDs, and Find Reviewer responses. Treat returned personal data as sensitive; the plugin omits it from logs and sanitized HTTP errors.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `reviews` | `object[]` | Yes | — |
| `links` | `object[]` | No | — |

> [accordion] reviews full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   stars?: number | null,
>   title?: string | null,
>   text?: string | null,
>   language?: string | null,
>   createdAt?: string | null,
>   updatedAt?: string | null,
>   experiencedAt?: string | null,
>   isVerified?: boolean,
>   numberOfLikes?: number,
>   consumer?: {
>     id?: string | null,
>     displayName?: string | null,
>     displayLocation?: string | null,
>     numberOfReviews?: number | null,
>     links?: {
>       href: string | null,
>       method: string | null,
>       rel: string | null
>     }[]
>   },
>   companyReply?: {
>     text: string | null,
>     createdAt: string | null,
>     updatedAt?: string | null
>   } | null,
>   links?: {
>     href: string | null,
>     method: string | null,
>     rel: string | null
>   }[],
>   referenceId?: string | null,
>   referralEmail?: string | null,
>   reportData?: {
>     source?: string | null,
>     publicComment?: string | null,
>     createdAt?: string | null,
>     reasons?: string[],
>     reason?: string | null,
>     reviewVisibility?: string | null
>   },
>   findReviewer?: {
>     isEligible?: boolean,
>     requests?: {
>       id?: string | null,
>       created?: string | null,
>       status?: string | null,
>       businessUserMessage?: string | null,
>       consumerResponse?: {
>         submittedAt?: string | null,
>         name?: string | null,
>         email?: string | null,
>         address?: string | null,
>         phoneNumber?: string | null,
>         referenceId?: string | null,
>         message?: string | null
>       }
>     }[]
>   }
> }[]
> ```

> [accordion] links full type
>
> ```ts theme={null}
> {
>   href: string | null,
>   method: string | null,
>   rel: string | null
> }[]
> ```

***

### profileInfo

`businessUnits.profileInfo`

Get a business unit company profile and contact details

**Risk:** `read`

```ts theme={null}
await corsair.trustpilot.api.businessUnits.profileInfo({ businessUnitId: '507f191e810c19729de860ea' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessUnitId` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `links` | `object[]` | No | — |
| `isSubscriber` | `boolean` | No | — |
| `email` | `string \| null` | No | — |
| `phone` | `string \| null` | No | — |
| `companyName` | `string \| null` | No | — |
| `isClaimed` | `boolean` | No | — |

> [accordion] links full type
>
> ```ts theme={null}
> {
>   href: string | null,
>   method: string | null,
>   rel: string | null
> }[]
> ```

***

### profilePromotion

`businessUnits.profilePromotion`

Get a business unit profile promotion and key brand messages

**Risk:** `read`

```ts theme={null}
await corsair.trustpilot.api.businessUnits.profilePromotion({ businessUnitId: '507f191e810c19729de860ea' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessUnitId` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `links` | `object[]` | No | — |
| `title` | `string` | Yes | — |
| `contactInfoTitle` | `string` | Yes | — |
| `description` | `object` | Yes | — |
| `sellingPoints` | `object[]` | Yes | — |
| `image` | `object` | Yes | — |

> [accordion] links full type
>
> ```ts theme={null}
> {
>   href: string | null,
>   method: string | null,
>   rel: string | null
> }[]
> ```

> [accordion] description full type
>
> ```ts theme={null}
> {
>   header: string,
>   text: string
> }
> ```

> [accordion] sellingPoints full type
>
> ```ts theme={null}
> {
>   header: string,
>   text: string
> }[]
> ```

> [accordion] image full type
>
> ```ts theme={null}
> {
>   url: string,
>   width: string
> }
> ```

***

### promotionBoxImage

`businessUnits.promotionBoxImage`

Get a business unit promotion-box image URL

**Risk:** `read`

```ts theme={null}
await corsair.trustpilot.api.businessUnits.promotionBoxImage({ businessUnitId: '507f191e810c19729de860ea' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessUnitId` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `promotionBoxUrl` | `string \| null` | Yes | — |

***

### publicAll

`businessUnits.publicAll`

List public business units with cursor pagination

**Risk:** `read`

```ts theme={null}
await corsair.trustpilot.api.businessUnits.publicAll({ perPage: 100 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `country` | `string[]` | No | — |
| `perPage` | `number` | No | — |
| `cursor` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessUnits` | `object[]` | Yes | — |
| `cursor` | `string \| null` | Yes | — |
| `links` | `object[]` | No | — |

> [accordion] businessUnits full type
>
> ```ts theme={null}
> {
>   id: string,
>   displayName: string,
>   name: {
>     identifying: string,
>     referring: string[]
>   },
>   country?: string | null,
>   links?: {
>     href: string | null,
>     method: string | null,
>     rel: string | null
>   }[]
> }[]
> ```

> [accordion] links full type
>
> ```ts theme={null}
> {
>   href: string | null,
>   method: string | null,
>   rel: string | null
> }[]
> ```

***

### publicPromotionBox

`businessUnits.publicPromotionBox`

Get public promotion-box content for a business unit

**Risk:** `read`

```ts theme={null}
await corsair.trustpilot.api.businessUnits.publicPromotionBox({ businessUnitId: '507f191e810c19729de860ea' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessUnitId` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `header` | `string` | Yes | — |
| `message` | `string` | Yes | — |
| `textColor` | `string` | Yes | — |
| `backgroundColor` | `string` | Yes | — |
| `buttonText` | `string` | Yes | — |
| `buttonColor` | `string` | Yes | — |
| `buttonTextColor` | `string` | Yes | — |
| `buttonLink` | `string` | Yes | — |
| `imageUrl` | `string` | Yes | — |
| `isPublished` | `boolean` | Yes | — |

***

### reviews

`businessUnits.reviews`

List public reviews for a business unit with filters

**Risk:** `read`

```ts theme={null}
await corsair.trustpilot.api.businessUnits.reviews({ businessUnitId: '507f191e810c19729de860ea', page: 1, perPage: 10 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessUnitId` | `string` | Yes | — |
| `page` | `number` | No | — |
| `perPage` | `number` | No | — |
| `stars` | `number[]` | No | — |
| `language` | `string[]` | No | — |
| `internalLocationId` | `string` | No | — |
| `orderBy` | `(createdat.asc \| createdat.desc \| stars.asc \| stars.desc)[]` | No | — |
| `tagGroup` | `string` | No | — |
| `tagValue` | `string` | No | — |
| `responded` | `boolean` | No | — |
| `includeReportedReviews` | `boolean` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `reviews` | `object[]` | Yes | — |
| `nextPageToken` | `string \| null` | No | — |
| `links` | `object[]` | No | — |

> [accordion] reviews full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   stars?: number | null,
>   title?: string | null,
>   text?: string | null,
>   language?: string | null,
>   createdAt?: string | null,
>   updatedAt?: string | null,
>   experiencedAt?: string | null,
>   isVerified?: boolean,
>   numberOfLikes?: number,
>   consumer?: {
>     id?: string | null,
>     displayName?: string | null,
>     displayLocation?: string | null,
>     numberOfReviews?: number | null,
>     links?: {
>       href: string | null,
>       method: string | null,
>       rel: string | null
>     }[]
>   },
>   companyReply?: {
>     text: string | null,
>     createdAt: string | null,
>     updatedAt?: string | null
>   } | null,
>   links?: {
>     href: string | null,
>     method: string | null,
>     rel: string | null
>   }[]
> }[]
> ```

> [accordion] links full type
>
> ```ts theme={null}
> {
>   href: string | null,
>   method: string | null,
>   rel: string | null
> }[]
> ```

***

### search

`businessUnits.search`

Search public business units by name or domain

**Risk:** `read`

```ts theme={null}
await corsair.trustpilot.api.businessUnits.search({
	query: 'shops',
	country: 'GB',
	page: 1,
	perpage: 10,
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `string` | Yes | — |
| `country` | `string` | No | — |
| `page` | `number` | No | — |
| `perpage` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessUnits` | `object[]` | Yes | — |
| `links` | `object[]` | No | — |

> [accordion] businessUnits full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   displayName?: string | null,
>   websiteUrl?: string | null,
>   country?: string | null,
>   status?: string | null,
>   numberOfReviews?: {
>     total: number,
>     usedForTrustScoreCalculation?: number,
>     oneStar?: number,
>     twoStars?: number,
>     threeStars?: number,
>     fourStars?: number,
>     fiveStars?: number
>   } | null,
>   score?: {
>     trustScore?: number | null,
>     stars?: number | null
>   } | null,
>   links?: {
>     href: string | null,
>     method: string | null,
>     rel: string | null
>   }[]
> }[]
> ```

> [accordion] links full type
>
> ```ts theme={null}
> {
>   href: string | null,
>   method: string | null,
>   rel: string | null
> }[]
> ```

***

### webLinks

`businessUnits.webLinks`

Get localized public profile and invitation links for a business unit

**Risk:** `read`

```ts theme={null}
await corsair.trustpilot.api.businessUnits.webLinks({ businessUnitId: '507f191e810c19729de860ea', locale: 'en-GB' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessUnitId` | `string` | Yes | — |
| `locale` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `links` | `object[]` | No | — |
| `locale` | `string \| null` | Yes | — |
| `profileUrl` | `string \| null` | Yes | — |
| `evaluateUrl` | `string \| null` | Yes | — |
| `evaluateEmbedUrl` | `string \| null` | Yes | — |

> [accordion] links full type
>
> ```ts theme={null}
> {
>   href: string | null,
>   method: string | null,
>   rel: string | null
> }[]
> ```

***

## Consumer Profiles

### bulk

`consumerProfiles.bulk`

Get multiple consumer profiles in one request

**Risk:** `read`

```ts theme={null}
await corsair.trustpilot.api.consumerProfiles.bulk({
	consumerIds: ['507f191e810c19729de860ea'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `consumerIds` | `string[]` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `consumers` | `object` | Yes | — |
| `notFoundConsumerIds` | `(string \| null)[]` | Yes | — |

> [accordion] consumers full type
>
> ```ts theme={null}
> Record<string, {
>   id?: string | null,
>   city?: string | null,
>   about?: string | null,
>   displayName?: string | null,
>   locale?: string | null,
>   gender?: string | null,
>   country?: string | null,
>   createdAt?: string | null,
>   hasImage?: boolean,
>   birthYear?: number | null
> }>
> ```

***

### createDisplayName

`consumerProfiles.createDisplayName`

Create a valid consumer display name from input text

**Risk:** `read`

```ts theme={null}
await corsair.trustpilot.api.consumerProfiles.createDisplayName({ displayName: 'Example Reviewer' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `displayName` | `string` | Yes | — |

**Output:** `string \| null`

***

### get

`consumerProfiles.get`

Get a consumer profile by consumer ID

**Risk:** `read`

```ts theme={null}
await corsair.trustpilot.api.consumerProfiles.get({ consumerId: '507f191e810c19729de860ea' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `consumerId` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `city` | `string \| null` | No | — |
| `about` | `string \| null` | No | — |
| `displayName` | `string \| null` | No | — |
| `locale` | `string \| null` | No | — |
| `gender` | `string \| null` | No | — |
| `country` | `string \| null` | No | — |
| `createdAt` | `string \| null` | No | — |
| `hasImage` | `boolean` | No | — |
| `birthYear` | `number \| null` | No | — |

***

### getWithReviews

`consumerProfiles.getWithReviews`

Get a consumer profile and review count

**Risk:** `read`

```ts theme={null}
await corsair.trustpilot.api.consumerProfiles.getWithReviews({ consumerId: '507f191e810c19729de860ea' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `consumerId` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `city` | `string \| null` | No | — |
| `about` | `string \| null` | No | — |
| `displayName` | `string \| null` | No | — |
| `locale` | `string \| null` | No | — |
| `gender` | `string \| null` | No | — |
| `country` | `string \| null` | No | — |
| `createdAt` | `string \| null` | No | — |
| `hasImage` | `boolean` | No | — |
| `birthYear` | `number \| null` | No | — |
| `numberOfReviews` | `number` | No | — |
| `links` | `object[]` | No | — |

> [accordion] links full type
>
> ```ts theme={null}
> {
>   href: string | null,
>   method: string | null,
>   rel: string | null
> }[]
> ```

***

### validateDisplayName

`consumerProfiles.validateDisplayName`

Validate a consumer display name

**Risk:** `read`

```ts theme={null}
await corsair.trustpilot.api.consumerProfiles.validateDisplayName({ displayName: 'Example Reviewer' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `displayName` | `string` | Yes | — |

**Output:** `string \| null`

***

### webLinks

`consumerProfiles.webLinks`

Get localized links to a consumer profile

**Risk:** `read`

```ts theme={null}
await corsair.trustpilot.api.consumerProfiles.webLinks({ consumerId: '507f191e810c19729de860ea', locale: 'en-GB' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `consumerId` | `string` | Yes | — |
| `locale` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `locale` | `string \| null` | No | — |
| `profileUrl` | `string \| null` | No | — |
| `links` | `object[]` | No | — |

> [accordion] links full type
>
> ```ts theme={null}
> {
>   href: string | null,
>   method: string | null,
>   rel: string | null
> }[]
> ```

***

## Consumers

### reviews

`consumers.reviews`

List reviews written by a Trustpilot consumer

**Risk:** `read`

```ts theme={null}
await corsair.trustpilot.api.consumers.reviews({ consumerId: '507f191e810c19729de860ea', page: 1, perPage: 10 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `consumerId` | `string` | Yes | — |
| `stars` | `number[]` | No | — |
| `language` | `string[]` | No | — |
| `internalLocationId` | `string` | No | — |
| `businessUnitId` | `string` | No | — |
| `page` | `number` | No | — |
| `perPage` | `number` | No | — |
| `orderBy` | `(createdat.asc \| createdat.desc \| stars.asc \| stars.desc)[]` | No | — |
| `includeReportedReviews` | `boolean` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `reviews` | `object[]` | Yes | — |
| `nextPageToken` | `string \| null` | No | — |
| `links` | `object[]` | No | — |

> [accordion] reviews full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   stars?: number | null,
>   title?: string | null,
>   text?: string | null,
>   language?: string | null,
>   createdAt?: string | null,
>   updatedAt?: string | null,
>   experiencedAt?: string | null,
>   isVerified?: boolean,
>   numberOfLikes?: number,
>   consumer?: {
>     id?: string | null,
>     displayName?: string | null,
>     displayLocation?: string | null,
>     numberOfReviews?: number | null,
>     links?: {
>       href: string | null,
>       method: string | null,
>       rel: string | null
>     }[]
>   },
>   companyReply?: {
>     text: string | null,
>     createdAt: string | null,
>     updatedAt?: string | null
>   } | null,
>   links?: {
>     href: string | null,
>     method: string | null,
>     rel: string | null
>   }[]
> }[]
> ```

> [accordion] links full type
>
> ```ts theme={null}
> {
>   href: string | null,
>   method: string | null,
>   rel: string | null
> }[]
> ```

***

## Data Solutions

### businessUnitDetails

`dataSolutions.businessUnitDetails`

Get Data Solutions business details and review statistics

**Risk:** `read`

```ts theme={null}
await corsair.trustpilot.api.dataSolutions.businessUnitDetails({ businessUnitId: '507f191e810c19729de860ea' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessUnitId` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `name` | `object` | Yes | — |
| `score` | `object` | No | — |
| `numberOfReviews` | `number \| object` | No | — |

> [accordion] name full type
>
> ```ts theme={null}
> {
>   display?: string,
>   identifying?: string,
>   referring?: string[]
> }
> ```

> [accordion] score full type
>
> ```ts theme={null}
> {
>   stars?: number,
>   trustScore?: number
> }
> ```

> [accordion] numberOfReviews full type
>
> ```ts theme={null}
> number | {
>   total: number,
>   usedForTrustScoreCalculation?: number,
>   oneStar?: number,
>   twoStars?: number,
>   threeStars?: number,
>   fourStars?: number,
>   fiveStars?: number
> }
> ```

***

### categories

`dataSolutions.categories`

List Data Solutions business categories

**Risk:** `read`

```ts theme={null}
await corsair.trustpilot.api.dataSolutions.categories({ countryCode: 'GB' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `countryCode` | `string` | No | — |
| `parentId` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `totalNumberOfCategories` | `number` | Yes | — |
| `categories` | `object[]` | Yes | — |

> [accordion] categories full type
>
> ```ts theme={null}
> {
>   categoryId: string,
>   parentId?: string | null,
>   childrenCategories?: string[],
>   numberOfBusinessUnits?: number
> }[]
> ```

***

### findBusinessUnits

`dataSolutions.findBusinessUnits`

Find Data Solutions business units by domain or category

**Risk:** `read`

```ts theme={null}
await corsair.trustpilot.api.dataSolutions.findBusinessUnits({ domain: 'shop.example', perPage: 20 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `domain` | `string` | No | — |
| `category` | `string` | No | — |
| `countryCode` | `string` | No | — |
| `perPage` | `number` | No | — |
| `nextToken` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessUnits` | `object[]` | Yes | — |
| `nextToken` | `string \| null` | No | — |

> [accordion] businessUnits full type
>
> ```ts theme={null}
> {
>   id: string,
>   name: {
>     display?: string,
>     identifying?: string
>   },
>   address?: {
>     countryCode?: string
>   }
> }[]
> ```

***

### latestReviews

`dataSolutions.latestReviews`

Get up to five recent Data Solutions service reviews

**Risk:** `read`

```ts theme={null}
await corsair.trustpilot.api.dataSolutions.latestReviews({ businessUnitId: '507f191e810c19729de860ea', limit: 5 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessUnitId` | `string` | Yes | — |
| `limit` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `reviews` | `object[]` | Yes | — |

> [accordion] reviews full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   stars?: number | null,
>   title?: string | null,
>   text?: string | null,
>   language?: string | null,
>   createdAt?: string | null,
>   updatedAt?: string | null,
>   experiencedAt?: string | null,
>   isVerified?: boolean,
>   numberOfLikes?: number,
>   consumer?: {
>     id?: string | null,
>     displayName?: string | null,
>     displayLocation?: string | null,
>     numberOfReviews?: number | null,
>     links?: {
>       href: string | null,
>       method: string | null,
>       rel: string | null
>     }[]
>   },
>   companyReply?: {
>     text: string | null,
>     createdAt: string | null,
>     updatedAt?: string | null
>   } | null,
>   links?: {
>     href: string | null,
>     method: string | null,
>     rel: string | null
>   }[]
> }[]
> ```

***

### searchBusinessUnits

`dataSolutions.searchBusinessUnits`

Search Data Solutions business units by name or domain

**Risk:** `read`

```ts theme={null}
await corsair.trustpilot.api.dataSolutions.searchBusinessUnits({ query: 'shop.example', perPage: 20 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `string` | Yes | — |
| `countryCode` | `string` | No | — |
| `perPage` | `number` | No | — |
| `nextToken` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessUnits` | `object[]` | Yes | — |
| `nextToken` | `string \| null` | No | — |

> [accordion] businessUnits full type
>
> ```ts theme={null}
> {
>   id: string,
>   name: {
>     display?: string,
>     identifying?: string,
>     referring?: string[]
>   },
>   address?: {
>     countryCode?: string
>   },
>   score?: {
>     trustScore?: number,
>     stars?: number
>   },
>   numberOfReviews?: number
> }[]
> ```

***

### serviceReviews

`dataSolutions.serviceReviews`

Page through Data Solutions service reviews

**Risk:** `read`

```ts theme={null}
await corsair.trustpilot.api.dataSolutions.serviceReviews({ businessUnitId: '507f191e810c19729de860ea', startDate: '2025-01-01' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessUnitId` | `string` | Yes | — |
| `startDate` | `string` | No | — |
| `endDate` | `string` | No | — |
| `nextToken` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `reviews` | `object[]` | Yes | — |
| `nextToken` | `string \| null` | No | — |

> [accordion] reviews full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   stars?: number | null,
>   title?: string | null,
>   text?: string | null,
>   language?: string | null,
>   createdAt?: string | null,
>   updatedAt?: string | null,
>   experiencedAt?: string | null,
>   isVerified?: boolean,
>   numberOfLikes?: number,
>   consumer?: {
>     id?: string | null,
>     displayName?: string | null,
>     displayLocation?: string | null,
>     numberOfReviews?: number | null,
>     links?: {
>       href: string | null,
>       method: string | null,
>       rel: string | null
>     }[]
>   },
>   companyReply?: {
>     text: string | null,
>     createdAt: string | null,
>     updatedAt?: string | null
>   } | null,
>   links?: {
>     href: string | null,
>     method: string | null,
>     rel: string | null
>   }[]
> }[]
> ```

***

## Invitations

### link

`invitations.link`

Create a service review invitation link and consume invitation allowance

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.trustpilot.api.invitations.link({
	businessUnitId: '507f191e810c19729de860ea',
	email: 'reviewer@example.com',
	name: 'Example Reviewer',
	locale: 'en-US',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessUnitId` | `string` | Yes | — |
| `locationId` | `string` | No | — |
| `referenceId` | `string` | No | — |
| `email` | `string` | Yes | — |
| `name` | `string` | Yes | — |
| `locale` | `string` | Yes | — |
| `tags` | `string[]` | No | — |
| `redirectUri` | `string` | No | — |

Invitation links require consumer email/name fields. The plugin does not log the request or echo those values in errors.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `url` | `string` | Yes | — |

***

### templates

`invitations.templates`

List invitation templates available to a business unit

**Risk:** `read`

```ts theme={null}
await corsair.trustpilot.api.invitations.templates({ businessUnitId: '507f191e810c19729de860ea' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessUnitId` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `templates` | `object[]` | Yes | — |

> [accordion] templates full type
>
> ```ts theme={null}
> {
>   id: string,
>   name: string,
>   isDefaultTemplate: boolean,
>   locale: string,
>   language: string,
>   type: string
> }[]
> ```

***

## Product Reviews

### attributeSummaries

`productReviews.attributeSummaries`

Get aggregated product attribute ratings for SKUs

**Risk:** `read`

```ts theme={null}
await corsair.trustpilot.api.productReviews.attributeSummaries({
	businessUnitId: '507f191e810c19729de860ea',
	skus: ['SKU-123'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessUnitId` | `string` | Yes | — |
| `skus` | `string[]` | Yes | — |
| `locale` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `summaries` | `object[]` | Yes | — |

> [accordion] summaries full type
>
> ```ts theme={null}
> {
>   sku: string | null,
>   attributes: {
>     id: string,
>     name: string,
>     type: string,
>     options?: (string | null)[],
>     totalOccurrences: number,
>     occurrences: {
>       one: number,
>       two: number,
>       three: number,
>       four: number,
>       five: number
>     },
>     average: number
>   }[]
> }[]
> ```

***

### batchSummaries

`productReviews.batchSummaries`

Get public product review summaries for several SKUs

**Risk:** `read`

```ts theme={null}
await corsair.trustpilot.api.productReviews.batchSummaries({
	businessUnitId: '507f191e810c19729de860ea',
	skus: ['SKU-123'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessUnitId` | `string` | Yes | — |
| `skus` | `string[]` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `summaries` | `object[]` | Yes | — |

> [accordion] summaries full type
>
> ```ts theme={null}
> {
>   sku?: string | null,
>   starsAverage?: number | null,
>   numberOfReviews?: {
>     total: number,
>     usedForTrustScoreCalculation?: number,
>     oneStar?: number,
>     twoStars?: number,
>     threeStars?: number,
>     fourStars?: number,
>     fiveStars?: number
>   }
> }[]
> ```

***

### createComment

`productReviews.createComment`

Publish a business comment on a product review conversation (public, seen by the reviewer)

**Risk:** `destructive`

```ts theme={null}
await corsair.trustpilot.api.productReviews.createComment({ conversationId: '507f191e810c19729de860ea', content: 'Thank you', integrationId: 'corsair' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `conversationId` | `string` | Yes | — |
| `content` | `string` | Yes | — |
| `integrationId` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `commentId` | `string` | Yes | — |
| `createdAt` | `string` | Yes | — |
| `author` | `object` | Yes | — |
| `content` | `string` | Yes | — |

> [accordion] author full type
>
> ```ts theme={null}
> {
>   id: string,
>   type: string
> }
> ```

***

### createConversation

`productReviews.createConversation`

Create a conversation for a product review

**Risk:** `write`

```ts theme={null}
await corsair.trustpilot.api.productReviews.createConversation({ reviewId: '507f191e810c19729de860ea' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `reviewId` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `conversationId` | `string` | Yes | — |

***

### getComment

`productReviews.getComment`

Get one comment from a product review conversation

**Risk:** `read`

```ts theme={null}
await corsair.trustpilot.api.productReviews.getComment({ conversationId: '507f191e810c19729de860ea', commentId: '507f191e810c19729de860ea' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `conversationId` | `string` | Yes | — |
| `commentId` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `commentId` | `string` | Yes | — |
| `createdAt` | `string` | Yes | — |
| `author` | `object` | Yes | — |
| `content` | `string` | Yes | — |

> [accordion] author full type
>
> ```ts theme={null}
> {
>   id: string,
>   type: string
> }
> ```

***

### getConversation

`productReviews.getConversation`

Get a private product review conversation and comments

**Risk:** `read`

```ts theme={null}
await corsair.trustpilot.api.productReviews.getConversation({ conversationId: '507f191e810c19729de860ea' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `conversationId` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `businessUnitId` | `string` | Yes | — |
| `consumerId` | `string` | Yes | — |
| `source` | `string` | Yes | — |
| `sourceId` | `string` | Yes | — |
| `state` | `string` | Yes | — |
| `comments` | `object[]` | Yes | — |

> [accordion] comments full type
>
> ```ts theme={null}
> {
>   commentId: string,
>   createdAt: string,
>   author: {
>     id: string,
>     type: string
>   },
>   content: string
> }[]
> ```

***

### importedReviews

`productReviews.importedReviews`

List imported product reviews for one or more SKUs

**Risk:** `read`

```ts theme={null}
await corsair.trustpilot.api.productReviews.importedReviews({
	businessUnitId: '507f191e810c19729de860ea',
	sku: ['SKU-123'],
	page: 1,
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessUnitId` | `string` | Yes | — |
| `page` | `number` | No | — |
| `perPage` | `number` | No | — |
| `sku` | `string[]` | Yes | — |
| `stars` | `number[]` | No | — |
| `language` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `productReviews` | `object[]` | Yes | — |
| `links` | `object[]` | No | — |

> [accordion] productReviews full type
>
> ```ts theme={null}
> {
>   createdAt: string | null,
>   stars: number,
>   content: string | null,
>   consumer: {
>     name: string | null
>   },
>   source: {
>     name: string | null
>   },
>   language: string | null
> }[]
> ```

> [accordion] links full type
>
> ```ts theme={null}
> {
>   href: string | null,
>   method: string | null,
>   rel: string | null
> }[]
> ```

***

### importedSummary

`productReviews.importedSummary`

Get rating counts for imported product reviews

**Risk:** `read`

```ts theme={null}
await corsair.trustpilot.api.productReviews.importedSummary({
	businessUnitId: '507f191e810c19729de860ea',
	sku: ['SKU-123'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessUnitId` | `string` | Yes | — |
| `sku` | `string[]` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `numberOfReviews` | `object` | Yes | — |
| `starsAverage` | `number` | Yes | — |
| `links` | `object[]` | No | — |

> [accordion] numberOfReviews full type
>
> ```ts theme={null}
> {
>   total: number,
>   usedForTrustScoreCalculation?: number,
>   oneStar?: number,
>   twoStars?: number,
>   threeStars?: number,
>   fourStars?: number,
>   fiveStars?: number
> }
> ```

> [accordion] links full type
>
> ```ts theme={null}
> {
>   href: string | null,
>   method: string | null,
>   rel: string | null
> }[]
> ```

***

### invitationLink

`productReviews.invitationLink`

Create a product review invitation link and consume invitation allowance

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.trustpilot.api.productReviews.invitationLink({
	businessUnitId: '507f191e810c19729de860ea',
	consumer: { email: 'reviewer@example.com', name: 'Example Reviewer' },
	products: [{ productUrl: 'https://shop.example/item', name: 'Item' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessUnitId` | `string` | Yes | — |
| `consumer` | `object` | Yes | — |
| `referenceId` | `string` | No | — |
| `locale` | `string` | No | — |
| `redirectUri` | `string` | No | — |
| `products` | `object[]` | No | — |
| `productIds` | `string[]` | No | — |

> [accordion] consumer full type
>
> ```ts theme={null}
> {
>   email: string,
>   name: string
> }
> ```

> [accordion] products full type
>
> ```ts theme={null}
> {
>   productUrl: string,
>   imageUrl?: string,
>   name: string,
>   sku?: string,
>   gtin?: string,
>   mpn?: string,
>   brand?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `reviewLinkId` | `string` | Yes | — |
| `reviewUrl` | `string` | Yes | — |

***

### list

`productReviews.list`

List public product reviews by SKU or product URL

**Risk:** `read`

```ts theme={null}
await corsair.trustpilot.api.productReviews.list({
	businessUnitId: '507f191e810c19729de860ea',
	sku: ['SKU-123'],
	page: 1,
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessUnitId` | `string` | Yes | — |
| `page` | `number` | No | — |
| `perPage` | `number` | No | — |
| `productUrl` | `string[]` | No | — |
| `sku` | `string[]` | No | — |
| `customerProductId` | `string` | No | — |
| `language` | `string` | No | — |
| `stars` | `number[]` | No | — |
| `locale` | `string` | No | — |
| `attributeIds` | `string[]` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `productReviews` | `object[]` | Yes | — |
| `links` | `object[]` | No | — |

> [accordion] productReviews full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   createdAt?: string | null,
>   updatedAt?: string | null,
>   stars?: number | null,
>   content?: string | null,
>   language?: string | null,
>   consumer?: {
>     id?: string | null,
>     displayName?: string | null,
>     displayLocation?: string | null,
>     numberOfReviews?: number | null,
>     links?: {
>       href: string | null,
>       method: string | null,
>       rel: string | null
>     }[]
>   },
>   attributeRatings?: {
>     attributeId: string,
>     attributeName: string,
>     rating: number
>   }[],
>   links?: {
>     href: string | null,
>     method: string | null,
>     rel: string | null
>   }[]
> }[]
> ```

> [accordion] links full type
>
> ```ts theme={null}
> {
>   href: string | null,
>   method: string | null,
>   rel: string | null
> }[]
> ```

***

### privateGet

`productReviews.privateGet`

Get one private product review and customer details

**Risk:** `read`

```ts theme={null}
await corsair.trustpilot.api.productReviews.privateGet({ reviewId: '507f191e810c19729de860ea' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `reviewId` | `string` | Yes | — |
| `locale` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `createdAt` | `string \| null` | No | — |
| `updatedAt` | `string \| null` | No | — |
| `stars` | `number \| null` | No | — |
| `content` | `string \| null` | No | — |
| `language` | `string \| null` | No | — |
| `consumer` | `object` | No | — |
| `attributeRatings` | `object[]` | No | — |
| `links` | `object[]` | No | — |
| `businessUnitId` | `string \| null` | No | — |
| `product` | `object` | No | — |
| `referenceId` | `string \| null` | No | — |
| `locale` | `string \| null` | No | — |
| `redirectUri` | `string \| null` | No | — |
| `state` | `string \| null` | No | — |
| `hasModerationHistory` | `boolean` | No | — |
| `conversationId` | `string \| null` | No | — |
| `total` | `number` | No | — |

> [accordion] consumer full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   email?: string | null,
>   name?: string | null
> }
> ```

> [accordion] attributeRatings full type
>
> ```ts theme={null}
> {
>   attributeId: string,
>   attributeName: string,
>   rating: number
> }[]
> ```

> [accordion] links full type
>
> ```ts theme={null}
> {
>   href: string | null,
>   method: string | null,
>   rel: string | null
> }[]
> ```

> [accordion] product full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   productUrl?: string | null,
>   productImages?: {
>     type: string,
>     url: string
>   }[],
>   name?: string | null,
>   sku?: string | null,
>   gtin?: string | null,
>   mpn?: string | null,
>   brand?: string | null
> }
> ```

***

### privateList

`productReviews.privateList`

List private product reviews including customer details

**Risk:** `read`

```ts theme={null}
await corsair.trustpilot.api.productReviews.privateList({ businessUnitId: '507f191e810c19729de860ea', page: 1, perPage: 10 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessUnitId` | `string` | Yes | — |
| `page` | `number` | No | — |
| `perPage` | `number` | No | — |
| `sku` | `string[]` | No | — |
| `customerProductId` | `string` | No | — |
| `language` | `string` | No | — |
| `state` | `string[]` | No | — |
| `locale` | `string` | No | — |

Private product reviews include consumer email and reference ID fields. Treat returned personal data as sensitive; the plugin omits it from logs and sanitized HTTP errors.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `productReviews` | `object[]` | Yes | — |
| `total` | `number` | No | — |
| `links` | `object[]` | No | — |

> [accordion] productReviews full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   createdAt?: string | null,
>   updatedAt?: string | null,
>   stars?: number | null,
>   content?: string | null,
>   language?: string | null,
>   consumer?: {
>     id?: string | null,
>     email?: string | null,
>     name?: string | null
>   },
>   attributeRatings?: {
>     attributeId: string,
>     attributeName: string,
>     rating: number
>   }[],
>   links?: {
>     href: string | null,
>     method: string | null,
>     rel: string | null
>   }[],
>   businessUnitId?: string | null,
>   product?: {
>     id?: string | null,
>     productUrl?: string | null,
>     productImages?: {
>       type: string,
>       url: string
>     }[],
>     name?: string | null,
>     sku?: string | null,
>     gtin?: string | null,
>     mpn?: string | null,
>     brand?: string | null
>   },
>   referenceId?: string | null,
>   locale?: string | null,
>   redirectUri?: string | null,
>   state?: string | null,
>   hasModerationHistory?: boolean,
>   conversationId?: string | null,
>   total?: number
> }[]
> ```

> [accordion] links full type
>
> ```ts theme={null}
> {
>   href: string | null,
>   method: string | null,
>   rel: string | null
> }[]
> ```

***

### publicConversation

`productReviews.publicConversation`

Get a public product review conversation and comments

**Risk:** `read`

```ts theme={null}
await corsair.trustpilot.api.productReviews.publicConversation({ conversationId: '507f191e810c19729de860ea' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `conversationId` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `businessUnitId` | `string` | Yes | — |
| `consumerId` | `string` | Yes | — |
| `comments` | `object[]` | Yes | — |

> [accordion] comments full type
>
> ```ts theme={null}
> {
>   commentId: string,
>   createdAt: string,
>   author: {
>     id: string,
>     type: string
>   },
>   content: string
> }[]
> ```

***

### summaries

`productReviews.summaries`

List private product review summaries for a business unit

**Risk:** `read`

```ts theme={null}
await corsair.trustpilot.api.productReviews.summaries({ businessUnitId: '507f191e810c19729de860ea', page: 1 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessUnitId` | `string` | Yes | — |
| `page` | `number` | No | — |
| `perPage` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `summaries` | `object[]` | Yes | — |
| `links` | `object[]` | No | — |

> [accordion] summaries full type
>
> ```ts theme={null}
> {
>   sku?: string | null,
>   starsAverage?: number | null,
>   numberOfReviews?: {
>     total: number,
>     usedForTrustScoreCalculation?: number,
>     oneStar?: number,
>     twoStars?: number,
>     threeStars?: number,
>     fourStars?: number,
>     fiveStars?: number
>   }
> }[]
> ```

> [accordion] links full type
>
> ```ts theme={null}
> {
>   href: string | null,
>   method: string | null,
>   rel: string | null
> }[]
> ```

***

### summary

`productReviews.summary`

Get product review rating counts and average stars

**Risk:** `read`

```ts theme={null}
await corsair.trustpilot.api.productReviews.summary({
	businessUnitId: '507f191e810c19729de860ea',
	sku: ['SKU-123'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessUnitId` | `string` | Yes | — |
| `sku` | `string[]` | No | — |
| `customerProductId` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `sku` | `string \| null` | No | — |
| `starsAverage` | `number \| null` | No | — |
| `numberOfReviews` | `object` | No | — |

> [accordion] numberOfReviews full type
>
> ```ts theme={null}
> {
>   total: number,
>   usedForTrustScoreCalculation?: number,
>   oneStar?: number,
>   twoStars?: number,
>   threeStars?: number,
>   fourStars?: number,
>   fiveStars?: number
> }
> ```

***

### updateComment

`productReviews.updateComment`

Replace the text of a published business comment on a product review conversation

**Risk:** `destructive`

```ts theme={null}
await corsair.trustpilot.api.productReviews.updateComment({
	conversationId: '507f191e810c19729de860ea',
	commentId: '507f191e810c19729de860ea',
	content: 'Updated reply',
	integrationId: 'corsair',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `conversationId` | `string` | Yes | — |
| `commentId` | `string` | Yes | — |
| `content` | `string` | Yes | — |
| `integrationId` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `commentId` | `string` | Yes | — |
| `createdAt` | `string` | Yes | — |
| `author` | `object` | Yes | — |
| `content` | `string` | Yes | — |

> [accordion] author full type
>
> ```ts theme={null}
> {
>   id: string,
>   type: string
> }
> ```

***

## Reviews

### get

`reviews.get`

Get the public details of a service review

**Risk:** `read`

```ts theme={null}
await corsair.trustpilot.api.reviews.get({ reviewId: '507f191e810c19729de860ea' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `reviewId` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `stars` | `number \| null` | No | — |
| `title` | `string \| null` | No | — |
| `text` | `string \| null` | No | — |
| `language` | `string \| null` | No | — |
| `createdAt` | `string \| null` | No | — |
| `updatedAt` | `string \| null` | No | — |
| `experiencedAt` | `string \| null` | No | — |
| `isVerified` | `boolean` | No | — |
| `numberOfLikes` | `number` | No | — |
| `consumer` | `object` | No | — |
| `companyReply` | `object \| null` | No | — |
| `links` | `object[]` | No | — |

> [accordion] consumer full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   displayName?: string | null,
>   displayLocation?: string | null,
>   numberOfReviews?: number | null,
>   links?: {
>     href: string | null,
>     method: string | null,
>     rel: string | null
>   }[]
> }
> ```

> [accordion] companyReply full type
>
> ```ts theme={null}
> {
>   text: string | null,
>   createdAt: string | null,
>   updatedAt?: string | null
> } | null
> ```

> [accordion] links full type
>
> ```ts theme={null}
> {
>   href: string | null,
>   method: string | null,
>   rel: string | null
> }[]
> ```

***

### getPrivate

`reviews.getPrivate`

Get private review information including customer data

**Risk:** `read`

```ts theme={null}
await corsair.trustpilot.api.reviews.getPrivate({ reviewId: '507f191e810c19729de860ea' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `reviewId` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `stars` | `number \| null` | No | — |
| `title` | `string \| null` | No | — |
| `text` | `string \| null` | No | — |
| `language` | `string \| null` | No | — |
| `createdAt` | `string \| null` | No | — |
| `updatedAt` | `string \| null` | No | — |
| `experiencedAt` | `string \| null` | No | — |
| `isVerified` | `boolean` | No | — |
| `numberOfLikes` | `number` | No | — |
| `consumer` | `object` | No | — |
| `companyReply` | `object \| null` | No | — |
| `links` | `object[]` | No | — |
| `referenceId` | `string \| null` | No | — |
| `referralEmail` | `string \| null` | No | — |
| `reportData` | `object` | No | — |
| `findReviewer` | `object` | No | — |

> [accordion] consumer full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   displayName?: string | null,
>   displayLocation?: string | null,
>   numberOfReviews?: number | null,
>   links?: {
>     href: string | null,
>     method: string | null,
>     rel: string | null
>   }[]
> }
> ```

> [accordion] companyReply full type
>
> ```ts theme={null}
> {
>   text: string | null,
>   createdAt: string | null,
>   updatedAt?: string | null
> } | null
> ```

> [accordion] links full type
>
> ```ts theme={null}
> {
>   href: string | null,
>   method: string | null,
>   rel: string | null
> }[]
> ```

> [accordion] reportData full type
>
> ```ts theme={null}
> {
>   source?: string | null,
>   publicComment?: string | null,
>   createdAt?: string | null,
>   reasons?: string[],
>   reason?: string | null,
>   reviewVisibility?: string | null
> }
> ```

> [accordion] findReviewer full type
>
> ```ts theme={null}
> {
>   isEligible?: boolean,
>   requests?: {
>     id?: string | null,
>     created?: string | null,
>     status?: string | null,
>     businessUserMessage?: string | null,
>     consumerResponse?: {
>       submittedAt?: string | null,
>       name?: string | null,
>       email?: string | null,
>       address?: string | null,
>       phoneNumber?: string | null,
>       referenceId?: string | null,
>       message?: string | null
>     }
>   }[]
> }
> ```

***

### getTags

`reviews.getTags`

Get tags assigned to a service review

**Risk:** `read`

```ts theme={null}
await corsair.trustpilot.api.reviews.getTags({ reviewId: '507f191e810c19729de860ea' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `reviewId` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tags` | `object[]` | Yes | — |

> [accordion] tags full type
>
> ```ts theme={null}
> {
>   group: string,
>   value: string
> }[]
> ```

***

### latest

`reviews.latest`

Get the latest service reviews for selected languages

**Risk:** `read`

```ts theme={null}
await corsair.trustpilot.api.reviews.latest({
	count: 5,
	language: ['en'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `count` | `number` | Yes | — |
| `language` | `string[]` | Yes | — |
| `filterUsersWithoutImages` | `boolean` | No | — |
| `locale` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `reviews` | `object[]` | Yes | — |

> [accordion] reviews full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   stars?: number | null,
>   title?: string | null,
>   text?: string | null,
>   language?: string | null,
>   createdAt?: string | null,
>   updatedAt?: string | null,
>   experiencedAt?: string | null,
>   isVerified?: boolean,
>   numberOfLikes?: number,
>   consumer?: {
>     id?: string | null,
>     displayName?: string | null,
>     displayLocation?: string | null,
>     numberOfReviews?: number | null,
>     links?: {
>       href: string | null,
>       method: string | null,
>       rel: string | null
>     }[]
>   },
>   companyReply?: {
>     text: string | null,
>     createdAt: string | null,
>     updatedAt?: string | null
>   } | null,
>   links?: {
>     href: string | null,
>     method: string | null,
>     rel: string | null
>   }[]
> }[]
> ```

***

### likes

`reviews.likes`

List consumers who liked a service review

**Risk:** `read`

```ts theme={null}
await corsair.trustpilot.api.reviews.likes({ reviewId: '507f191e810c19729de860ea' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `reviewId` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `likes` | `object[]` | Yes | — |

> [accordion] likes full type
>
> ```ts theme={null}
> {
>   consumer: {
>     id: string | null,
>     displayName: string | null
>   }
> }[]
> ```

***

### webLinks

`reviews.webLinks`

Get localized links to a public service review

**Risk:** `read`

```ts theme={null}
await corsair.trustpilot.api.reviews.webLinks({ reviewId: '507f191e810c19729de860ea', locale: 'en-GB' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `reviewId` | `string` | Yes | — |
| `locale` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `locale` | `string \| null` | Yes | — |
| `reviewUrl` | `string \| null` | Yes | — |
| `links` | `object \| null` | No | — |

> [accordion] links full type
>
> ```ts theme={null}
> {
>   href: string | null,
>   method: string | null,
>   rel: string | null
> } | null
> ```

***


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.