# PowerReviews

> Read product reviews and questions, and send reviews, answers and responses to PowerReviews.

App · 12 actions. Web page: https://docs.lodol.com/docs/integrations/powerreviews

## Actions

### Get display settings

Get the merchant's review display settings and text for a locale.

**Inputs**

- Locale (`locale`, text): The language and country of the content, such as en_US or fr_FR. Leave empty for en_US. Default: `en_US`.

**Outputs**

- `data` (object): The response from PowerReviews.

**Example output**

```json
{
  "data": {
    "features": {},
    "localizations": {},
    "properties": {}
  }
}
```

### Get product rating summaries

Get the average rating and review count of one or more products.

**Inputs**

- Locale (`locale`, text): The language and country of the content, such as en_US or fr_FR. Leave empty for en_US. Default: `en_US`.
- Product page IDs (`page_ids`, list, required): The products' page IDs.

**Outputs**

- `data` (object): The response from PowerReviews.

**Example output**

```json
{
  "data": {
    "name": "example",
    "paging": {
      "current_page_number": 1,
      "next_page_url": "example",
      "page_size": 1,
      "pages_total": 1,
      "total_results": 1
    },
    "results": [
      {}
    ]
  }
}
```

### Get review form

Get the questions a product's write-a-review form asks, with each field's key.

**Inputs**

- Product page ID (`page_id`, text, required): The product's page ID in PowerReviews (usually your product ID or SKU).
- Variant ID (`page_id_variant`, text): The product variant's ID, such as a size or color, if reviews are kept per variant.
- Locale (`locale`, text): The language and country, such as en_US. Leave empty for the merchant's own.
- Reviewer email (`merchant_user_email`, text): The reviewer's email address, if you know it.
- Order ID (`order_id`, text): The order the product was bought in.
- Your review ID (`unique_review_id`, text): Your own ID for the review, so PowerReviews can spot a second copy.

**Outputs**

- `data` (object): The response from PowerReviews.

**Example output**

```json
{
  "data": {
    "context_information": {
      "image_template_id": 1,
      "product_id": 1,
      "product_template_id": 1
    },
    "fields": [
      {
        "choices": [
          {}
        ],
        "field_type": "example",
        "helper_text": "example",
        "id": "example",
        "input_type": "example",
        "key": "example",
        "label": "example",
        "required": true
      }
    ],
    "started_timestamp": "example"
  }
}
```

### List answers

List the published answers to a question.

**Inputs**

- Locale (`locale`, text): The language and country of the content, such as en_US or fr_FR. Leave empty for en_US. Default: `en_US`.
- Question ID (`question_id`, text, required): The question's ID.
- Results per page (`page_size`, number): How many to read, from 1 to 25. Leave empty for the default. From 1 to 25.
- Skip (`offset`, number): How many to skip, to read the next page: 25 for the second page of 25. From 0 to 9975.

**Outputs**

- `data` (object): The response from PowerReviews.

**Example output**

```json
{
  "data": {
    "name": "example",
    "paging": {
      "current_page_number": 1,
      "next_page_url": "example",
      "page_size": 1,
      "pages_total": 1,
      "total_results": 1
    },
    "results": [
      {}
    ]
  }
}
```

### List product questions

List the published questions about one product.

**Inputs**

- Locale (`locale`, text): The language and country of the content, such as en_US or fr_FR. Leave empty for en_US. Default: `en_US`.
- Product page ID (`page_id`, text, required): The product's page ID in PowerReviews (usually your product ID or SKU).
- Sort by (`sort`, text): How to order the questions. One of: `Newest`, `Oldest`, `MostAnswers`.
- Results per page (`page_size`, number): How many to read, from 1 to 25. Leave empty for the default. From 1 to 25.
- Skip (`offset`, number): How many to skip, to read the next page: 25 for the second page of 25. From 0 to 9975.

**Outputs**

- `data` (object): The response from PowerReviews.

**Example output**

```json
{
  "data": {
    "name": "example",
    "paging": {
      "current_page_number": 1,
      "next_page_url": "example",
      "page_size": 1,
      "pages_total": 1,
      "total_results": 1
    },
    "results": [
      {}
    ]
  }
}
```

### List product reviews

List a product's published reviews and its rating summary.

**Inputs**

- Locale (`locale`, text): The language and country of the content, such as en_US or fr_FR. Leave empty for en_US. Default: `en_US`.
- Product page ID (`page_id`, text, required): The product's page ID in PowerReviews (usually your product ID or SKU).
- Sort by (`sort`, text): How to order the reviews. One of: `Newest`, `Oldest`, `HighestRating`, `LowestRating`, `MostHelpful`.
- With photos only (`image_only`, true/false): Only reviews with photos.
- Results per page (`page_size`, number): How many to read, from 1 to 25. Leave empty for the default. From 1 to 25.
- Skip (`offset`, number): How many to skip, to read the next page: 25 for the second page of 25. From 0 to 9975.

**Outputs**

- `data` (object): The response from PowerReviews.

**Example output**

```json
{
  "data": {
    "name": "example",
    "paging": {
      "current_page_number": 1,
      "next_page_url": "example",
      "page_size": 1,
      "pages_total": 1,
      "total_results": 1
    },
    "results": [
      {
        "page_id": "example",
        "reviews": [
          {
            "badges": {
              "is_staff_reviewer": true,
              "is_verified_buyer": true,
              "is_verified_reviewer": true
            },
            "details": {
              "comments": "example",
              "created_date": 1,
              "headline": "example",
              "locale": "example",
              "location": "example",
              "nickname": "example",
              "product_name": "example",
              "product_page_id": "example",
              "updated_date": 1
            },
            "internal_review_id": 1,
            "media": [
              {}
            ],
            "metrics": {
              "helpful_score": 1,
              "helpful_votes": 1,
              "not_helpful_votes": 1,
              "rating": 1
            },
            "review_id": 1,
            "ugc_id": 1
          }
        ],
        "rollup": {
          "average_rating": 1,
          "name": "example",
          "rating_histogram": [
            1
          ],
          "recommended_ratio": 1,
          "review_count": 1
        }
      }
    ]
  }
}
```

### List questions

List the published questions about every product, asked since a date.

**Inputs**

- Since (`since`, date and time, required): Only questions asked on or after this time.
- Results per page (`page_size`, number): How many to read, from 1 to 25. Leave empty for the default. From 1 to 25.
- Skip (`offset`, number): How many to skip, to read the next page: 25 for the second page of 25. From 0 to 9975.

**Outputs**

- `data` (object): The response from PowerReviews.

**Example output**

```json
{
  "data": {
    "name": "example",
    "paging": {
      "current_page_number": 1,
      "next_page_url": "example",
      "page_size": 1,
      "pages_total": 1,
      "total_results": 1
    },
    "results": [
      {}
    ]
  }
}
```

### List reviews

List the published reviews of every product, written or changed since a date.

**Inputs**

- Since (`since`, date and time, required): Only reviews written (or changed, if you choose) on or after this time.
- Use date changed (`by_updated_date`, true/false): Turn on to find reviews by when they were last changed, not when they were written.
- Results per page (`page_size`, number): How many to read, from 1 to 25. Leave empty for the default. From 1 to 25.
- Skip (`offset`, number): How many to skip, to read the next page: 25 for the second page of 25. From 0 to 9975.

**Outputs**

- `data` (object): The response from PowerReviews.

**Example output**

```json
{
  "data": {
    "name": "example",
    "paging": {
      "current_page_number": 1,
      "next_page_url": "example",
      "page_size": 1,
      "pages_total": 1,
      "total_results": 1
    },
    "results": [
      {
        "page_id": "example",
        "reviews": [
          {
            "badges": {
              "is_staff_reviewer": true,
              "is_verified_buyer": true,
              "is_verified_reviewer": true
            },
            "details": {
              "comments": "example",
              "created_date": 1,
              "headline": "example",
              "locale": "example",
              "location": "example",
              "nickname": "example",
              "product_name": "example",
              "product_page_id": "example",
              "updated_date": 1
            },
            "internal_review_id": 1,
            "media": [
              {}
            ],
            "metrics": {
              "helpful_score": 1,
              "helpful_votes": 1,
              "not_helpful_votes": 1,
              "rating": 1
            },
            "review_id": 1,
            "ugc_id": 1
          }
        ],
        "rollup": {
          "average_rating": 1,
          "name": "example",
          "rating_histogram": [
            1
          ],
          "recommended_ratio": 1,
          "review_count": 1
        }
      }
    ]
  }
}
```

### Respond to review

Post your brand's public response under a review.

**Inputs**

- Product page ID (`page_id`, text, required): The product's page ID in PowerReviews (usually your product ID or SKU).
- Variant ID (`page_id_variant`, text): The product variant's ID, such as a size or color, if reviews are kept per variant.
- Locale (`locale`, text): The language and country, such as en_US. Leave empty for the merchant's own.
- Review ID (`review_id`, number, required): The review's ID (its ugc_id in List reviews). At least 1.
- Response (`text`, text, required): Your response.
- Name (`author_name`, text): The name to show for the person.
- Email (`author_email`, text): The person's email address.
- Location (`author_location`, text): Where the person is, such as Chicago, IL.

**Outputs**

- `data` (object): The response from PowerReviews.

**Example output**

```json
{
  "data": {
    "error_code": "example",
    "message": "example",
    "status_code": "example"
  }
}
```

### Submit answer

Answer a published question about a product. It waits for moderation before it is published.

**Inputs**

- Product page ID (`page_id`, text, required): The product's page ID in PowerReviews (usually your product ID or SKU).
- Variant ID (`page_id_variant`, text): The product variant's ID, such as a size or color, if reviews are kept per variant.
- Locale (`locale`, text): The language and country, such as en_US. Leave empty for the merchant's own.
- Question ID (`question_id`, number, required): The question's ID, from List product questions. At least 1.
- Answer (`answer_text`, text, required): The answer.
- Name (`author_name`, text): The name to show for the person.
- Email (`author_email`, text): The person's email address.
- Location (`author_location`, text): Where the person is, such as Chicago, IL.
- From an expert (`is_expert`, true/false): Mark the answer as from an expert, such as your own staff.
- Verified buyer (`is_verified_buyer`, true/false): Mark the person as a verified buyer.

**Outputs**

- `data` (object): The response from PowerReviews.

**Example output**

```json
{
  "data": {
    "answer_data": {
      "answer_text": "example",
      "author_email": "example",
      "author_location": "example",
      "author_name": "example",
      "is_expert": true,
      "is_verified_buyer": true,
      "question_id": 1
    },
    "question_data": {
      "author_email": "example",
      "author_location": "example",
      "author_name": "example",
      "merchant_question_id": "example",
      "question_text": "example",
      "question_type": "example"
    }
  }
}
```

### Submit question

Send a customer's question about a product. It waits for moderation before it is published.

**Inputs**

- Product page ID (`page_id`, text, required): The product's page ID in PowerReviews (usually your product ID or SKU).
- Variant ID (`page_id_variant`, text): The product variant's ID, such as a size or color, if reviews are kept per variant.
- Locale (`locale`, text): The language and country, such as en_US. Leave empty for the merchant's own.
- Question (`question_text`, text, required): The question.
- Name (`author_name`, text): The name to show for the person.
- Email (`author_email`, text): The person's email address.
- Location (`author_location`, text): Where the person is, such as Chicago, IL.
- Your question ID (`merchant_question_id`, text): Your own ID for the question.

**Outputs**

- `data` (object): The response from PowerReviews.

**Example output**

```json
{
  "data": {
    "product_information": {},
    "question_data": {
      "author_email": "example",
      "author_location": "example",
      "author_name": "example",
      "merchant_question_id": "example",
      "question_text": "example",
      "question_type": "example"
    }
  }
}
```

### Submit review

Send a customer's review of a product. It waits for moderation in PowerReviews before it is published.

**Inputs**

- Product page ID (`page_id`, text, required): The product's page ID in PowerReviews (usually your product ID or SKU).
- Variant ID (`page_id_variant`, text): The product variant's ID, such as a size or color, if reviews are kept per variant.
- Locale (`locale`, text): The language and country, such as en_US. Leave empty for the merchant's own.
- Reviewer email (`merchant_user_email`, text): The reviewer's email address.
- Order ID (`order_id`, text): The order the product was bought in.
- Your review ID (`unique_review_id`, text): Your own ID for the review, so PowerReviews can spot a second copy.
- Rating (`rating`, number, required): The star rating, from 1 to 5. From 1 to 5.
- Headline (`headline`, text, required): The review's title.
- Review (`comments`, text, required): The review itself.
- Nickname (`nickname`, text, required): The name to show for the reviewer.
- Location (`location`, text): Where the reviewer is, such as Chicago, IL.
- Email (`email`, text): The reviewer's email address, for forms that ask for it.
- Other answers (`other_answers`, object): Answers to the form's other questions, by each field's key from Get review form, such as {"bottomline": "Yes"}.

**Outputs**

- `data` (object): The response from PowerReviews.

**Example output**

```json
{
  "data": {
    "context_information": {
      "image_template_id": 1,
      "product_id": 1,
      "product_template_id": 1
    },
    "fields": [
      {
        "choices": [
          {}
        ],
        "field_type": "example",
        "helper_text": "example",
        "id": "example",
        "input_type": "example",
        "key": "example",
        "label": "example",
        "required": true
      }
    ],
    "started_timestamp": "example"
  }
}
```
