# Quest Doc ## 1. Endpoint to check if rider has quest ##### POST /{driver_id}/check-status requst -> ``` { "vertical": "food", "restaurent_id": "11111aaaaaaa", "pickup_location": { "lat": 29.01, "lon": 89.90 }, "vehicle_type": "car", "city_id": 1 } ``` response -> ``` { "data": { "has_quest": true, "payment_methods": [ "bkash", "card" ] } } ``` ## 2. List of Quest ##### GET /quests/{driver_id}status=active ``` status = active, completed, failed active: on_going history: all except on_going history = completed, failed ``` response -> ``` { "data": [ { "quest_name": "Quest 1", "quest_id": "111ssaaia9881810ajaja", "status": "completed", "vehicle_type": "car", "vertical": "ride", "start_date_time": "15 Aug 2019 2:00PM", "end_date_time": "15 Aug 2019 2:00PM", "trips_given": 10, "trips_target": 12, "title": { "en": "En Title", "bn": "Bn Title" }, "body": { "en": "En Body", "bn": "Bn Body" } } ], "meta": { "current_items": 1, "current_page": 1, "total_items": 1, "total_page": 1 } } ``` ## 3. Quest Details ##### GET /drivers/{driver_id}/quests/{quest_id} response -> ``` { "data": { "quest_name": "Quest 1", "title": { "en": "En Title", "bn": "Bn Title" }, "quest_id": "111ssaaia9881810ajaja", "status": "completed", "start_date": "15 Aug 2019 5MP", "end_date": "17 Aug 2019 6AM", "duration_type": 1, // periodic = 1 | continuos = 2 "quest_status": "active", "vehicle_type": "car", "vertical": "food", "quest_restaurant":true, "conditions": { "payment_methods": ["bKash"], "steps": [ { "trip_count": 10, "award": 500, "completion_rate": 80, "acceptance_rate": 82, "rating": 85, "is_achieved": true } ] }, "progress": { "trips_given": 10, "trips_target": 12, "total_assigned": 10, "total_earnings": 500, "completion_rate": 80 } } } ``` Docs : https://magic.pathao.com/platform/quest/blob/develop/docs/enums.md