# New City And Vertical Changes
## Endpoint: `estimation`
- **URL:** /v2/me/rides/estimation?lang=en|bn|ne
- **Method:** POST
- **HEADERS**
| KEY | VALUE | Data Type
| ----------------- | ----------- | ---------
| Content-Type | application/json | String
| Authorization | Bearer {{toekn}} | String
### Request Payload:
```json
{
"country_id" : 2,
"city_id" : 6,
"is_business_enable" : true,
"estimated_pickup_latitude" : 27.66858838756219,
"estimated_pickup_longitude" : 84.4203092890717,
"estimated_dropoff_latitude" : 27.69036757729427,
"estimated_dropoff_longitude" : 84.43449751155481,
"stoppage" : [],
"code": "BIKE40",
"estimated_pickup_address" : "A",
"estimated_dropoff_address" : "B",
}
```
### Response:
- response with 200(along with the existing response)
```json=
{
"auto": { // New key same as bike, car, car_lite
"service_name": "Tuktuk",
"service_icon": "",
"service_icon_non_selected": "",
"estimated_fare": 156,
"estimated_fare_cent": 15600,
"estimated_fare_applied_promo": 0,
"estimated_fare_applied_promo_cent": 0,
"is_applied_promo": false,
"is_surge_applied": false,
"is_negative_surge_applied": false,
"is_dp_offers_available": false,
"policy_bottom_text": "",
"service_description": "ঘরে থাকুন, নিরাপদে থাকুন। শুধুমাত্র জরুরি প্রয়োজনে রাইড নিন।",
"estimated_duration": "13 mins",
"pricing": {
"base_fare": 50,
"per_minute_fare": 2,
"per_kilo_fare": 20,
"min_fare": 120,
"is_min_fare_active": false,
"insurance_fee": 2
},
"fare_receipt": [
[
{
"title": "आधार शुल्क",
"value": "रु50.00",
"type": "text"
},
{
"title": "प्रति किलोमिटर",
"value": "रु20.00",
"type": "text"
},
{
"title": "प्रति मिनेट",
"value": "रु2.00",
"type": "text"
},
{
"title": "ईन्श्योरेन्स शुल्क",
"value": "रु2.00",
"type": "text"
},
{
"title": "न्युनतम शुल्क",
"value": "रु120.00",
"type": "text"
}
]
],
"is_pickup_fee_active": false
},
}
```
## Endpoint: Get customer Applied Available Promo Codes
- **URL:** /v1/me/rides/promo/codes
- **Method:** POST
- **HEADERS**
| KEY | VALUE | Data Type
| ----------------- | ----------- | ---------
| Content-Type | application/json | String
| Authorization | Bearer {{toekn}} | String
- **Request Payload**
```json=
{
"city_id": 6,
"country_id": 2,
"with_unapplied_promo": true"
"bike": {
"fare": 150,
"is_intercity": false
},
"car": {
"fare": 350,
"is_intercity": true
},
"carlite": {
"fare": 450,
"is_intercity": false
}
"auto": { // New Key
"fare": 450,
"is_intercity": false
}
}
```
| KEY | VALUE | Data Type | Options
| ----------------- | ----------- | --------- | ------
| city_id | {{city_id}} | Integer |
| country_id | {{country_id}} | Integer |
| with_unapplied_promo | {{with_unapplied_promo}} | boolean |
| **bike** | | | Optional
| fare | {{fare}} | integer | Optional
| is_intercity | {{is_intercity}} | boolean |
| **car** | | | Optional
| fare | {{fare}} | integer | Optional
| is_intercity | {{is_intercity}} | boolean |
| **carlite** | | | Optional
| fare | {{fare}} | integer | Optional
| is_intercity | {{is_intercity}} | boolean |
| **auto** | | | Optional
| fare | {{fare}} | integer | Optional
| is_intercity | {{is_intercity}} | boolean |
## Endpoint: `History`
- **URL:** /v1/me/rides?ride_type=6&per_page=15&status=COMPLETED&page=0 // ride_type=1|2|5|6
- **Method:** GET
## Response: Same as before
## Endpoint: Get Users History Tab
- **URL:** /v1/historytabs?lang=en
- **Method:** GET
- **HEADERS**
| KEY | VALUE | Data Type
| ----------------- | ----------- | ---------
| Content-Type | application/json | String
| Authorization | Bearer {{toekn}} | String
## Response:
```json=
[
{
"id" : 1,
"name" : "Bike",
"last_order" : true,
"show_cancel" : true,
},
{
"id" : 2,
"name" : "Car",
"last_order" : true,
"show_cancel" : true,
},
{
"id" : 3,
"name" : "Food",
"last_order" : false,
"show_cancel" : true,
},
{
"id" : 5,
"name" : "Parcel",
"last_order" : false,
"show_cancel" : true,
},
{
"id" : 7,
"name" : "TukTuk",
"last_order" : true,
"show_cancel" : true,
}
]
```
## Endpoint: Get nearest avaialble drivers
- **URL:** /v1/drivers/nearest?lat=23.76576654&long=90.8976567&dist=0
- **Method:** GET
- **HEADERS**
| KEY | VALUE | Data Type
| ----------------- | ----------- | ---------
| Content-Type | application/json | String
| Authorization | Bearer {{toekn}} | String
## Response:
```json=
{
"bikes": [],
"cars": [],
"cars_lite": [],
"auto": []
}
```
# Deployment Notes
## Config Changes:
- Add the following config to ride-core/config
```
service_name:
auto_en: TukTuk
auto_bn: টুকটুক
auto_ne: टुकटुक
dhk_auto_en: CNG
dhk_auto_bn: সিএনজি
dhk_auto_ne: CNG
```
```
static_content:
auto_service_icon: "/service/icons/ic_tuktuk-tile-v2.png"
auto_service_icon_not_selected: "/service/icons/ic_tuktuk_inactive-new.png"
```
```
service_description :
auto_en: Our affordable TukTuk can host up to 3 people & is perfect for your daily commute.
auto_bn: আমাদের সাশ্রয়ী টুকটুক ৩ জনের প্রতিদিনের যাতায়াতের জন্য উপযুক্ত।
auto_ne: हाम्रो टुकटुक् ले सुपथ मूल्यमा ३ जनासम्मलाई होस्ट गर्न सक्छ र तपाईंको दैनिक यात्राको लागि उपयुक्त छ।
dhk_auto_en: Our affordable CNG can host up to 3 people & is perfect for your daily commute.
dhk_auto_bn: আমাদের সাশ্রয়ী সিএনজি ৩ জনের প্রতিদিনের যাতায়াতের জন্য উপযুক্ত।
dhk_auto_ne: हाम्रो CNG ले सुपथ मूल्यमा ३ जनासम्मलाई होस्ट गर्न सक्छ र तपाईंको दैनिक यात्राको लागि उपयुक्त छ।
```
```
restricted_contents:
static_content:
auto_service_icon: "/service/icons/ic_tuktuk-tile-v2.png"
auto_service_icon_not_selected: "/service/icons/ic_tuktuk_inactive-new.png"
```
```
restricted_contents:
service_description:
auto_en: Our affordable TukTuk can host up to 3 people & is perfect for your daily commute.
auto_bn: আমাদের সাশ্রয়ী টুকটুক ৩ জনের প্রতিদিনের যাতায়াতের জন্য উপযুক্ত।
auto_ne: हाम्रो टुकटुक् ले सुपथ मूल्यमा ३ जनासम्मलाई होस्ट गर्न सक्छ र तपाईंको दैनिक यात्राको लागि उपयुक्त छ।
dhk_auto_en: Our affordable CNG can host up to 3 people & is perfect for your daily commute.
dhk_auto_bn: আমাদের সাশ্রয়ী সিএনজি ৩ জনের প্রতিদিনের যাতায়াতের জন্য উপযুক্ত।
dhk_auto_ne: हाम्रो CNG ले सुपथ मूल्यमा ३ जनासम्मलाई होस्ट गर्न सक्छ र तपाईंको दैनिक यात्राको लागि उपयुक्त छ।
```
```
restricted_contents:
service_name:
auto_en: TukTuk
auto_bn: টুকটুক
auto_ne: टुकटुक
dhk_auto_en: CNG
dhk_auto_bn: সিএনজি
dhk_auto_ne: CNG
```
```
excluded_driver_limit :
ctwbike: 5
ctwauto: 5
pkhbike: 5
pkhcar: 5
pkhcarlite: 5
```
```
redispatched_cities:
ids: [1,2,4,6,7]
```
- Update the following config rides-governor/miscellaneous:
```
miscellaneous:
payment_options:
- key: payment_options_1
Selector:
city_id: "4,6"
ride_type: "*"
Resolver:
available_options_key: ["CASH_ON_DELIVERY"]
available_options_name: ["Cash Payment"]
default_option: "CASH_ON_DELIVERY"
- key: payment_options_default
Selector:
city_id: "*"
ride_type: "*"
Resolver:
available_options_key: ["DIGITAL_PAYMENT", "PAY_LATER", "CASH_ON_DELIVERY", "PATHAO_PAY"]
available_options_name: ["Digital Payment", "Pay Later", "Cash Payment", "Pathao Pay"]
default_option: "CASH_ON_DELIVERY"
```
### Rides-Core Changes:
- Merge 'feature/new-city-vertical' branch into master
- Deploy into production
### Rides-Governor Changes:
- Merge 'feature/new-city-vertical' branch into master
- Deploy into production
### Monolith changes:
- Merge 'feature/city-expansion' branch into master
- Deploy into production
### Email Serive changes:
- Merge 'feature/city-expansion' branch into master
- Deploy into production