This API provides brand-level data for a normalized hierarchy provided
Sample Response
{
success: true,
message: "API for brands Leader Board",
errorCode: ""
result:[{
"brandName": "Benefit Cosmetics",
"brandId": "benefitcosmetics",
"logo": "https://imgcdn.shortlyst.com/?u=https%3A%2F%2Fsl-in-brand-media.s3.ap-south-1.amazonaws.com%2F3709EDD673FF106BB1FFC05DAF9D6230_202102241208836716377853097965273983875415863943461n.jpg",
"youtube": "https://www.youtube.com/channel/UCJBwRJnyNLV8dEdF2fdIH-A",
"facebook": "https://www.facebook.com/1404008676507526",
"twitter": "https://twitter.com/intent/user?user_id=18220767",
"instagram": "https://www.instagram.com/benefitindia",
"salesVelocity": [
{
"date": "2021-10-31",
"score": 3.651255,
"scoreDistribution": [
{
"merchant": "amazon",
"keyspecificScore": 0.013066,
"percentageChange": -33.71214
},
{
"merchant": "nykaa",
"keyspecificScore": 5.239727,
"percentageChange": 33.946426
},
{
"merchant": "flipkart",
"keyspecificScore": 0,
"percentageChange": 0
}
],
"percentageChange": 150.96019
}
]
}
]
}
Response Fields
Field | Description | Data Type |
---|---|---|
success | Indicates if API response is a success or not. | bool |
message | Info about the response. | string |
errorCode | Error code. | string |
brandName | Brand name. | string |
brandId | Brand id which will be unique. | string |
logo | Brand logo. | url string |
youtube/facebook/twitter/instagram | Channel info for the brand. | url string |
salesVelocity/visibility/discoverability/buyability | Metric level data. | list of dict |
date | Date. | string |
score | Score. | float |
scoreDistribution | Drilled down from the overall score. | list of dict |
merchant | Merchant name. | string |
keyspecificScore | Score. | float |
percentageChange | Change in score compared to last month in %. | float |
sltype | Indicate the type of data (instore/offstore/availability/ratingscore/..). | string |
key | Can be any platform depends on the metric (merchant name/ youtube/facebook/google/..). Eg: in case of visibility-offstore value will be “youtube/facebook”, in case of discoverability-offstore value will be “google”. | string |
Exceptions and Error Conditions
The Leaderboard 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
- Invalid node details passed
In the above scenario, the leaderboard API would return with an error response.
Example:
{
"success": false,
"message": "required division, category, subCategory",
"errorCode": "INVALID_PARAMS",
"result": ""
}