Skip to content

Review methods: update

The Review Verbs update as typed SDK methods, with inputs, result, refusals and an example.

Reference for Review, one group of Review methods.

Review.update

Changes the given properties of a Review. Verb page.

TypeScript
interface ReviewVerbs {
  update(input: ReviewUpdateInput, options?: SB.CallOptions): SB.Call<Review>
}

Emits Review.updated.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Review.
ratingintegerThe score, from 1 to 5.
bodytextThe reviewer’s words.
venuestringThe venue it was posted on, by id; empty for the Startup’s own Site.
displayConsentbooleanTrue once the reviewer agreed it may be shown on the Startup’s own Pages. Never randomized.
customerCustomerThe Customer who wrote it, when known.

Returns

OutputTypeRequiredDescription
reviewReviewrequiredThe Review.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

TypeScript
import { $ } from 'startup-builder'

const review = await $.Review.update({ id: 'review_1XPL2xTlfx', rating: 1 })