Ratings & Reviews
Questions and Answers
Products
Orders
Moderation
Powered by Stoplight

Welcome

Welcome to PowerReviews API documentation site! Here you’ll find comprehensive information for integrating with PowerReviews using our REST API.

The PowerReviews API is organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Getting Started

1. Create API credentials

To access the Enterprise API, you will first need to reach out to your account manager at PowerReviews; they will provide you with the credentials to access the API.

You have two API keys:

client_id: Your application’s client ID

client_secret: Private identifier required for accessing data

Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.

2. Authenticate and get the access token

To request an access token, you will need to query the /oauth2 endpoint.

Base URL: https://enterprise-api.powerreviews.com

Use your client_id and client_secret keys from step 1:

curl -X POST --user <client_id>:<client_secret>  \
    'https://enterprise-api.powerreviews.com/oauth2/token?grant_type=client_credentials' \
  -H 'Content-Type: application/x-www-form-urlencoded'

If authentication is succesful, you will receive this response:

{
  "access_token": "eyJraWQiOiJcL1FzZmszSWJmd1JEbENQMXR6T...",
  "expires_in": 3600,
  "token_type": "Bearer"
}

3. Get review content

Your application must send an OAuth2 access token in an Authorization header with each request. Use the token from step 2 to get review content from the /reviews endpoint.

The /reviews endpoint will provide you the list of all your reviews; this includes pending, approved, and rejected content. You will be able to ingest the content incrementally by using the “updated_date” parameter.

curl -s https://enterprise-api.powerreviews.com/v1/reviews \
-H 'Authorization:Bearer <access_token>' \
-H 'Accept:application/json'

Successful response:

{
  "count": 1,
  "reviews": [
    {
      "id": 244793153,
      "headline": "Great Product",
      "rating": 5,
      "comments": "Comments 2019-11-14::12:55:04.425 en_US",
      "nickname": "Name 2019-11-14::12:55:04.425 en_US",
      "email": "test@email.com",
      "location": "Location 2019-11-14::12:55:04.425 en_US",
      "bottom_line": "Yes",
      "locale": "en_US",
      "type": "Review",
      "product_page_id": "656960633",
      "merchant_group_id": 13245,
      "merchant_id": 67891,
      "created_date": 1573721704556,
      "updated_date": 1573721720391,
      "helpful_votes": 0,
      "not_helpful_votes": 0,
      "review_source": "web",
      "client_publication_status": "APPROVED",
      "pwr_publication_status": "APPROVED"
    }
  ]
}

Now that you know the basics of using the API, you might want to check out the API Reference for more details.

Pagination

Parameter Description
limit optional Number of results per call. Accepted values: 1 - 100. Default 100
next_page optional A cursor for use in pagination. next_page is an ID that defines the beginning next page in the stream.

Timestamps

Timestamps are expressed in Unix Time (milliseconds since Epoch, Jan 1, 1970, midnight UTC+0)

created_date: timestamp when the review was submitted

updated_date: timestamp for publication changes, i.e. a review was updated to ‘approved’ from ‘pending’ publication status.

Versioning

​ PowerReviews API is versioned to give you the latest features while also safely ensuring your apps don’t break when we launch changes. ​

Status codes

  • 200 OK Successful request
  • 202 The request has been accepted for processing, but the processing has not been completed
  • 400 Bad Request Returns JSON with the error message
  • 401 Unauthorized Couldn’t authenticate your request
  • 402 2FA Token required Re-try request with user’s 2FA token as CB-2FA-Token header
  • 403 Invalid scope User hasn’t authorized necessary scope
  • 404 Not Found No such object
  • 500 Internal Server Error Something went wrong
  • 503 Service Unavailable Your connection is being throttled or the service is down for maintenance