# Driver Badges-Compliement Response
## Get All Tags
> GET /v1/tags
#### Query Params
> tag_type [string, required, RIDE|FOOD|PARCEL]
> language [string, optional, bn|en|ne, Default:en]
```json
{
"tags": [
{
"id": 1,
"title": "Poor navigation",
"icon": "",
"description": "",
"slug": "poor_navigation",
"tag_type": "RIDE",
"sequence": 1,
"rating_1": 1,
"rating_2": 1,
"rating_3": 0,
"rating_4": 0,
"rating_5": 0,
"tag_summary_id": 1
},
{
"id": 9,
"title": "Professional",
"icon": "example-image.png",
"description": "",
"slug": "professional",
"tag_type": "RIDE",
"sequence": 9,
"rating_1": 0,
"rating_2": 0,
"rating_3": 0,
"rating_4": 0,
"rating_5": 1,
"tag_summary_id": 6
},
{
"id": 16,
"title": "Neat and clean",
"icon": "example-image.png",
"description": "",
"slug": "neat_and_clean",
"tag_type": "RIDE",
"sequence": 16,
"rating_1": 0,
"rating_2": 0,
"rating_3": 0,
"rating_4": 0,
"rating_5": 1,
"tag_summary_id": 13
}
]
}
```
## Get Badges
> GET /v1/driver/badges
#### Query Params
> driver_id [integer, required]
> language [string, optional, en|bn|ne, Default:en]
> platform [string, optional, RIDE|FOOD, Default: all]
> order_id [string, optional, <ride_id>|<order_id>]
> user_type [string, required, 'user|driver'] [will get from Gateway]
```json
{
"data": {
"driver_id": 8274,
"is_active": 1,
"badges": [
{
"id": 1,
"slug": "rating",
"title": "1000 5-star rating",
"record": "1000",
"tier": 3,
"icon" : "example.png"
},
{
"id": 2,
"slug": "age",
"title": "8+ years Pathao",
"record": "8",
"tier": 3,
"icon" : "example.png"
},
{
"id": 3,
"slug": "distance",
"title": "40KM+ travelled",
"record": "40",
"tier": 3,
"icon" : "example.png"
},
{
"id": 4,
"slug": "trip",
"title": "150+ trip in a month",
"record": "150",
"tier": 2,
"icon" : "example.png"
},
{
"id": 5,
"slug": "payment",
"title": "35+ Digital payment in a month",
"record": "35",
"tier": 3,
"icon" : "example.png"
}
]
}
}
```
## Driver Empty Badge Response
```json
{
"data": {
"driver_id": 2222,
"is_active": 0,
"badge_empty_message": "Share more and more ride to collect your achievement badges ",
"badges": null
}
}
```
## Driver Inactive Badge Response
```json
{
"data": {
"driver_id": 2222,
"is_active": 0,
"inactive_reason": "Please increase your rating to 4 in order to unlock your achievement badges.",
"badges": [
{
"id": 1,
"slug": "rating",
"title": "1000 ৫ স্টার রেটিং",
"record": "1000",
"tier": 3,
"icon": "https://cdn.pathao.com/driver/badges/icon/disabled/rating.png"
}
]
}
}
```
## Compliments and Improvements Response
#### URL
> GET /v1/driver/compliments-improvements
#### Query Params
> driver_id [integer, required]
> language [string, optinal, en|bn|ne]
> order_id [string, required, <ride_id>|<order_id>]
> user_type [string, required, 'user|driver'] [will get from Gateway]
```json
{
"data": {
"driver_id": 2222,
"top_compliment": {
"tag_summary_id": 6,
"slug": "professional",
"title": "Professional",
"count": 5
"icon": "icon-link"
},
"compliments": [
{
"tag_summary_id": 6,
"slug": "professional",
"title": "Professional",
"count": 5,
"icon": "icon-link"
},
{
"tag_summary_id": 7,
"slug": "cool_vehicle",
"title": "Cool vehicle",
"count": 3,
"icon": "icon-link"
}
],
"improvements": [
{
"tag_summary_id": 2,
"slug": "vehicle_quality",
"title": "5 passengers wanted a better quality vehicle",
"count": 9,
"icon": "icon-link"
},
{
"tag_summary_id": 1,
"slug": "navigation",
"title": "13 passengers wanted a quick and smooth ride",
"count": 5,
"icon": "icon-link"
},
{
"tag_summary_id": 3,
"slug": "behavior",
"title": "2 passengers felt you could be friendlier",
"count": 5,
"icon": "icon-link"
}
]
}
}
```
## Empty Compliment/Improvement
```json
{
"data": {
"top_compliment": {
"tag_summary_id": 0,
"slug": "",
"title": "",
"count": 0,
"icon": ""
},
"driver_id": 8274,
"compliments": null,
"improvements": null,
"compliment_empty_message": "Collect compliments from passengers by getting 5-star ratings",
"improvement_empty_message": "Share more and more ride and ask your passengers for rating to see improvement suggestions"
}
}
```
## Badges and Compliments Stat Response
#### URL
> GET /v1/driver/badges-compliment/stat
#### Query Params
> driver_id [integer, required]
```json
{
"data": {
"driver_id": 8274,
"badge_count": 5,
"compliment_count": 56
}
}
```
## App URL to get access of those following routes
```
curl -X GET \
'https://api.p-stageenv.xyz/v1/ratings/tags?tag_type=RIDE&language=bn' \
-H 'Authorization: PqTLxZ9FUIs7YmwKjrHURHuIILXaZi9kZSDvIX0S'
curl -X GET \
'https://api.p-stageenv.xyz/v1/ratings/driver/badges?driver_id=824&platform=FOOD&language=ne' \
-H 'Authorization: PqTLxZ9FUIs7YmwKjrHURHuIILXaZi9kZSDvIX0S'
curl -X GET \
'https://api.p-stageenv.xyz/v1/ratings/driver/compliments-improvements?driver_id=824&language=en' \
-H 'Authorization: PqTLxZ9FUIs7YmwKjrHURHuIILXaZi9kZSDvIX0S'
curl -X GET \
'https://api.p-stageenv.xyz/v1/ratings/driver/badges-compliment/stat?driver_id=824' \
-H 'Authorization: PqTLxZ9FUIs7YmwKjrHURHuIILXaZi9kZSDvIX0S'
```