import Whop from '@whop/sdk';
const client = new Whop({
apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted
});
const review = await client.reviews.retrieve('rev_xxxxxxxxxxxxxx');
console.log(review.id);{
"id": "rev_xxxxxxxxxxxxxx",
"title": "Amazing community and tools",
"description": "Great product, really helped me grow my audience.",
"stars": 42,
"status": "pending",
"paid_for_product": true,
"created_at": "2023-12-01T05:00:00.401Z",
"updated_at": "2023-12-01T05:00:00.401Z",
"published_at": "2023-12-01T05:00:00.401Z",
"joined_at": "2023-12-01T05:00:00.401Z",
"user": {
"id": "user_xxxxxxxxxxxxx",
"name": "John Doe",
"username": "johndoe42"
},
"attachments": [
{
"id": "<string>",
"filename": "document.pdf",
"content_type": "image/jpeg",
"url": "https://media.whop.com/abc123/optimized.jpg"
}
],
"company": {
"id": "biz_xxxxxxxxxxxxxx",
"title": "Pickaxe",
"route": "pickaxe"
},
"product": {
"id": "prod_xxxxxxxxxxxxx",
"title": "Pickaxe Analytics"
}
}Retrieves the details of an existing review.
import Whop from '@whop/sdk';
const client = new Whop({
apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted
});
const review = await client.reviews.retrieve('rev_xxxxxxxxxxxxxx');
console.log(review.id);{
"id": "rev_xxxxxxxxxxxxxx",
"title": "Amazing community and tools",
"description": "Great product, really helped me grow my audience.",
"stars": 42,
"status": "pending",
"paid_for_product": true,
"created_at": "2023-12-01T05:00:00.401Z",
"updated_at": "2023-12-01T05:00:00.401Z",
"published_at": "2023-12-01T05:00:00.401Z",
"joined_at": "2023-12-01T05:00:00.401Z",
"user": {
"id": "user_xxxxxxxxxxxxx",
"name": "John Doe",
"username": "johndoe42"
},
"attachments": [
{
"id": "<string>",
"filename": "document.pdf",
"content_type": "image/jpeg",
"url": "https://media.whop.com/abc123/optimized.jpg"
}
],
"company": {
"id": "biz_xxxxxxxxxxxxxx",
"title": "Pickaxe",
"route": "pickaxe"
},
"product": {
"id": "prod_xxxxxxxxxxxxx",
"title": "Pickaxe Analytics"
}
}A company API key, company scoped JWT, app API key, or user OAuth token. You must prepend your key/token with the word 'Bearer', which will look like Bearer ***************************
The unique identifier of the review to retrieve.
"rev_xxxxxxxxxxxxxx"
A successful response
A user-submitted review of a company, including a star rating and optional text feedback.
The unique identifier for the review.
"rev_xxxxxxxxxxxxxx"
A short summary title for the review. Null if the reviewer did not provide one.
"Amazing community and tools"
The body text of the review containing the user's detailed feedback. Returns an empty string if no description was provided.
"Great product, really helped me grow my audience."
The star rating given by the reviewer, from 1 to 5.
42
The current moderation status of the review.
pending, published, removed Whether the reviewer paid for the product. Null if the payment status is unknown.
The datetime the review was created.
"2023-12-01T05:00:00.401Z"
The datetime the review was last updated.
"2023-12-01T05:00:00.401Z"
The timestamp of when the review was published. Null if the review has not been published yet.
"2023-12-01T05:00:00.401Z"
The timestamp of when the reviewer first joined the product. Null if unknown.
"2023-12-01T05:00:00.401Z"
The user account of the person who wrote this review.
Show child attributes
A list of files and media attached to the review.
Show child attributes
The company that this review was written for.
Show child attributes
The product that this review was written for.
Show child attributes
Was this page helpful?