How to fetch product review statistics using Flowbox's API
Prerequisites
Before you start, ensure you have the following:
- API key: Your unique API authentication key. If you don't have it yet, please contact your CSM and they'll provide it to you.
- Company ID: Your company identifier. Your CSM can provide it for you.
API Endpoint
To retrieve the list of flows in your Flowbox account, you need to send a GET request to the following endpoint:
https://external-api.getflowbox.com/v2/reviews/company/{companyId}/stats
You can find more information and make test calls in our Swaggerhub page.
Required Parameters
Parameter | Type | Location | Description |
|---|---|---|---|
| string | header | Your API authentication key. Must be included in every request. |
| string | path | Your Company ID. Can be provided by your CSM. |
Optional Parameters
Parameter | Type | Location | Description |
|---|---|---|---|
| string | query | Product identifier to fetch stats for. |
Example API Request
Here is an example request with both required and optional parameters:
curl -X 'GET' \
'https://external-api.getflowbox.com/v2/reviews/company/INSERT_COMPANY_ID/stats?product_identifier=PRODUCT_ID_1' \
-H 'accept: application/json' \
-H 'api-key: INSERT_API_KEY_HERE'Response:
The response will be a JSON containing the review's statistics for the company provided.
JSON returned:
Root:
Field | Type | Description |
|---|---|---|
| string | Request status. One of: |
| integer | Total number of reviews for the company (or product, if provided). |
| float | Average star rating across all reviews, e.g. |
| array | Array of review counts per star rating. See Rating Breakdown table below. |
Rating Breakdown:
Field | Type | Description |
|---|---|---|
| float | Star rating value integer, from |
| integer | Number of reviews with this star rating. |