GCP.MerchantApiReviews reference
MerchantReview
Section titled “MerchantReview”Source:
src/GCP/MerchantApiReviews/MerchantReview.ts
A Merchant Center merchant review (Merchant API Reviews).
Reviews have no labels field — Alchemy stamps ownership into
customAttributes (never the review text) so list / nuke can find
them. account and merchantReviewId are identity.
insertAccountsMerchantReviews is a full-document upsert, so updates
replace the review in place. Creating a review requires a Merchant
Center account enrolled in merchant reviews and a merchant-reviews
data source.
MerchantReview: Creating a Merchant Review
Section titled “MerchantReview: Creating a Merchant Review”Generated id
const review = yield* GCP.MerchantApiReviews.MerchantReview("Storefront", { account: "123456", dataSource: "accounts/123456/dataSources/789", merchantReviewAttributes: { title: "Great shop", content: "Fast shipping", rating: 5, },});Explicit id
const review = yield* GCP.MerchantApiReviews.MerchantReview("Storefront", { account: "123456", dataSource: "accounts/123456/dataSources/789", merchantReviewId: "storefront-2020", merchantReviewAttributes: { title: "Great shop", content: "Fast shipping", rating: 5, reviewLanguage: "en", reviewCountry: "US", },});MerchantReview: Updating a Merchant Review
Section titled “MerchantReview: Updating a Merchant Review”const review = yield* GCP.MerchantApiReviews.MerchantReview("Storefront", { account: "123456", dataSource: "accounts/123456/dataSources/789", merchantReviewAttributes: { title: "Even better", content: "Fast shipping and packing", rating: 5, },});ProductReview
Section titled “ProductReview”Source:
src/GCP/MerchantApiReviews/ProductReview.ts
A Merchant Center product review (Merchant API Reviews).
Reviews have no labels field — Alchemy stamps ownership into
customAttributes (never the review text) so list / nuke can find
them. account and productReviewId are identity.
insertAccountsProductReviews is a full-document upsert, so updates
replace the review in place. Creating a review requires a Merchant
Center account enrolled in product ratings and a product-reviews
data source.
ProductReview: Creating a Product Review
Section titled “ProductReview: Creating a Product Review”Generated id
const review = yield* GCP.MerchantApiReviews.ProductReview("Tote", { account: "123456", dataSource: "accounts/123456/dataSources/789", productReviewAttributes: { title: "Sturdy tote", content: "Holds a laptop and lunch", rating: 5, gtins: ["9780007350896"], },});Explicit id
const review = yield* GCP.MerchantApiReviews.ProductReview("Tote", { account: "123456", dataSource: "accounts/123456/dataSources/789", productReviewId: "tote-2020", productReviewAttributes: { title: "Sturdy tote", content: "Holds a laptop and lunch", rating: 5, skus: ["tote-navy"], reviewLanguage: "en", reviewCountry: "US", },});ProductReview: Updating a Product Review
Section titled “ProductReview: Updating a Product Review”const review = yield* GCP.MerchantApiReviews.ProductReview("Tote", { account: "123456", dataSource: "accounts/123456/dataSources/789", productReviewAttributes: { title: "Roomy tote", content: "Holds a laptop, lunch, and jacket", rating: 4, skus: ["tote-navy"], },});