This API returns the rating details of the mapped products for a given brand and date.

Sample Response

{
    "success": true,
    "message": "",
    "errorCode": "",
    "result": {
        "data": [
            {
                "codeType": "EAN",
                "merchant": "shopee",
                "brand": "anmum",
                "skuId": "B079ZC7KKN",
                "title": "Anmum Essential Step 3 Plain (1.5kg)",
                "code": "6902395642602",
                "coc": false,
                "ratingsCount": 185,
                "avgRating": 4.962162,
                "ratingsDistribution": {
                    "4_star": 2,
                    "3_star": 1,
                    "2_star": 1,
                    "5_star": 181,
                    "1_star": 0
                }
            }
        ],
        "total": 1,
        "type": "rating",
        "date": "2021-05-02"
    }
}

Response Fields

Field

Description

Data Type

success

Indicates if API response is success or not.

bool

message

Response message. Typically populated in error scenarios.

string

errorCode

Error code.

string

codeType

Product code type.

string

merchant

Merchant name.

string

brand

Brand name.

string

skuId

Product id at merchant site.

string

ratingCount

Number of ratings.

number

avgRating

Average rating.

number

ratingsDistribution

Ratings Split.

object

title

Title as seen at merchant site.

string

code

Product code.

string

coc

Core of the core.

bool

total

Total product count.

number

date

Date.

string

Exceptions and Error Conditions

The Rating API will look for matching data based on the filters applied. However, there are a few scenarios where the API may not be able to return a valid response. For example

  • Data request for a future date
  • Data requested for invalid merchant/brand combination
  • Invalid access token (API response status code 401)
  • Missing authentication token (API response status code 401)

In all the above scenarios, the Rating API would return with an error response.
Example:

{
  "success": false,
  "message": "You can not request for future date",
  "errorCode": "INVALID_DATE",
  "result": ""
}
Language
Credentials
Header
Click Try It! to start a request and see the response here!