---
# System prepended metadata

title: Booking serveice api docs v1

---

# Booking serveice api docs v1
## API documentation for booking service v1

<span style="color:red">`base_url`</span>: https://api-dev.loopfreight.io/lf-booking/api/v1

# Module: Booking
## 1. Module: Booking

### 1.1 Booking create as an admin or kam
* **Description:** Two roles "admin" or "kam" places new booking for shippers. Admin needs to input `{shipperId}` and `{companyId}` to distinguish the underneath shippers. Input fields are delineated the field types and requirements.  Respose body json stands for front-end input.
* **Permission role**: admin and kam
* **Method**:`POST`
* **Api path**:`/admin/booking`
* **Headers**: `Authorization` : `Bearer {access_token}`
* **Input Fields**: 

| Field Name | Sample Data | Required|
| -------- | -------- |--------|
| `companyId`: `number`| `1` |`true`|
| `shipperId`: `string` | `01FR4YRSNH7930GJ13A1T34AZ6` |`true`|
| `pickupDate`: `date` | `2022-01-10` |`true`|
| `pickupTime`: `object` |`{"start": "12:00","end": "06:00"}`|`true`|
|`fromLocation`:`object`|`{"address": "Khulna University","addressLocale": {"bn": "Khulna University","en": "Khulna University"}, "latitude": 22.8022039,"longitude": 89.5339231}`|`true`|
|`toLocation`:`object` |`{"address": "Cox's Bazar Airport.","addressLocale": {"bn": "Cox's Bazar Airport","en": "Cox's Bazar Airport."},"latitude": 21.4507,"longitude": 91.9667}`|`true`|
|`minPrice`:`number`|`1000`|`true`|
|`maxPrice`:`number`|`2005`|`true`|
|`truckTypeId`: `number`|`38`|`true`|
|`truckQuantity`:`number`|`4`|`true`| 
|`bookingItems`:`object[]`|`[{"id": 6, "measurements": [{ "name": "quantity", "unit": "bags", "value": "50" } ] }]`|`true`|
|`stoppages`:`object[]`|`[{"address": "Barishal Launch Ghat", "addressLocale": {"bn": "Barishal Launch", "en": "Barishal Launch Ghat"}, "latitude": 22.6999559,"longitude": 90.3750962}, { "address": "Feni Central High School (FCHS )", "addressLocale": {"bn": "Barishal Launch", "en": "Feni Central High School (FCHS )"},"latitude": 23.0063522,"longitude": 91.40222}]`|`false`|
|`loadingAgentId`:`string`|`01FR1Y19Y34YVCT1TWZCD7TZEY`|`false`|
|`unloadingAgentId`:`string`|`01FR1Y19Y34YVCT1TWZCD7TZEY`|`true`|

* **Request Body**:
```json=
{
	"companyId": 1,
	"shipperId": "01FR4YRSNH7930GJ13A1T34AZ6",
	"pickupDate": "2022-01-10",
	"pickupTime": { "start": "12:00", "end": "06:00"}, "fromLocation": { "address": "Khulna University", "addressLocale": { "bn": "Khulna University", "en": "Khulna University"}, "latitude": 22.8022039, "longitude": 89.5339231},
	"toLocation": { "address": "Cox's Bazar Airport.", "addressLocale": { "bn": "Cox's Bazar Airport","en": "Cox's Bazar Airport." },"latitude": 21.4507, "longitude": 91.9667 },
	"minPrice": 1000,
	"maxPrice": 2005,
	"truckTypeId": 38,
	"truckQuantity": 4,
	"bookingItems": [ {"id": 6,"measurements": [{"name": "quantity", "unit": "bags", "value": 50} ] }],
        "stoppages": [{ "address": "Barishal Launch Ghat", "addressLocale": { "bn": "Barishal Launch", "en": "Barishal Launch Ghat" }, "latitude": 22.6999559, "longitude": 90.3750962 }, { "address": "Feni Central High School (FCHS )", "addressLocale": {"bn": "Barishal Launch","en": "Feni Central High School (FCHS )" }, "latitude": 23.0063522, "longitude": 91.40222} ], 
        "loadingAgentId": "01FR1Y19Y34YVCT1TWZCD7TZEY", 
        "unloadingAgentId": "01FR1Y19Y34YVCT1TWZCD7TZEY"
}
```
* **Response**:

```status_code: 201```
```json=
{
"success": true,
"message": "Booking create successfully.",
"data": {
    "id": 96,
    "truckQuantity": 4,
    "truckType": {
        "id": 38,
        "truckTypeEn": "20FT Open Truck",
        "truckTypeBn": "২০ ফুট খোলা ট্রাক",
        "status": "active"
    },
    "truckCategory": {
        "id": 3,
        "truckCategoryEn": "Trailer",
        "truckCategoryBn": "ট্রেইলার",
        "status": "active"
    },
    "bookingItems": [
        {
            "itemId": 6,
            "name": "cement",
            "label": {
                "en": "Cement",
                "bn": "সিমেন্ট"
            },
            "measurements": [
                {
                    "name": "quantity",
                    "unit": {
                        "name": "bags",
                        "label": {
                            "en": "Bags",
                            "bn": "ব্যাগ"
                        }
                    },
                    "value": 50
                }
            ]
        }
    ],
    "fromLocation": {
        "address": "Khulna University",
        "latitude": 22.8022039,
        "longitude": 89.5339231,
        "addressLocale": {
            "bn": "Khulna University",
            "en": "Khulna University"
        }
    },
    "toLocation": {
        "address": "Cox's Bazar Airport.",
        "latitude": 21.4507,
        "longitude": 91.9667,
        "addressLocale": {
            "bn": "Cox's Bazar Airport",
            "en": "Cox's Bazar Airport."
        }
    },
    "fromDistrict": {
        "address": "Khulna, Khulna, Bangladesh",
        "latitude": 22.815774,
        "longitude": 89.568679,
        "addressLocale": {
            "bn": "খুলনা",
            "en": "Khulna"
        }
    },
    "toDistrict": {
        "address": "Cox's Bazar, Chittagong, Bangladesh",
        "latitude": 21.4272,
        "longitude": 92.0058,
        "addressLocale": {
            "bn": "কক্সবাজার",
            "en": "Cox's Bazar"
        }
    },
    "additionalNotes": "",
    "createdAt": "2022-01-13T06:12:04.573Z",
    "stoppages": [
        {
            "address": "Barishal Launch Ghat",
            "latitude": 22.6999559,
            "longitude": 90.3750962,
            "addressLocale": {
                "bn": "Barishal Launch",
                "en": "Barishal Launch Ghat"
            }
        },
        {
            "address": "Feni Central High School (FCHS )",
            "latitude": 23.0063522,
            "longitude": 91.40222,
            "addressLocale": {
                "bn": "Barishal Launch",
                "en": "Feni Central High School (FCHS )"
            }
        }
    ],
    "minPrice": 1000,
    "maxPrice": 2005,
    "loadingAgent": {},
    "unloadingAgent": {},
    "shipper": {
        "userId": "01FR4YRSNH7930GJ13A1T34AZ6",
        "email": "4aeffh1hknn@gmail.com",
        "phone": "+8801676554422",
        "fullName": "aa",
        "gender": "male",
        "role": "shipper"
    },
    "kam": {
        "userId": "01FRMT9G4YA91ZH53E560P2PRH",
        "email": "e255rdch1@gmail.com",
        "phone": "+8801754137298",
        "fullName": "2ty1dch1",
        "gender": "male",
        "role": "kam"
    }
  }
}
```
### 1.2 Booking list by admin
#### 1.2.1 Booking list for admin
* **Description:** The "admin" and "kam" gets the full booking lists which are submitted till date.  Pagination is included and `{bookingStatus}` will sort the query as following pattern.
* **Permission role**: admin and kam
* **Method**:`GET`
* **Api path**:`/admin/booking/`
* **Headers**: `Authorization` : `Bearer {access_token}`
* **Input Query**

| Field Name | Sample Data | 
| -------- | -------- |
| `page`: `number`| `1` |
| `limit`: `number`| `10` |
| `bookingStatus`: `string`|`requested`, `scheduled`, `activated`, `cancelled`, `completed`, `expired`|
* **Request Body**: 
```no request body```
* **Response**:
```status_code: 200```
```json=
{
	"success": true,
	"message": "Booking get successfully.",
	"count": 258,
	"data": [
		{
			"id": 262,
			"truckQuantity": 3,
			"truckType": {
				"id": 45,
				"truckTypeEn": "Flat Bed Trailer: 4XL 40FT",
				"truckTypeBn": "ফ্ল্যাট বেড ট্রেলার: ৪ এক্সেল",
				"status": "active"
			},
			"truckCategory": {
				"id": 4,
				"truckCategoryEn": "Covered Van",
				"truckCategoryBn": "কাভার্ড ভ্যান",
				"status": "active"
			},
			"pickupDate": "2022-01-25",
			"pickupTime": {
				"end": "18:00",
				"start": "12:00"
			},
			"bookingItems": [
				{
					"itemId": "11",
					"name": "sand",
					"label": {
						"en": "Sand",
						"bn": "বালু"
					},
					"measurements": [
						{
							"name": "quantity",
							"unit": {
								"name": "bags",
								"label": {
									"en": "Bags",
									"bn": "ব্যাগ"
								}
							},
							"value": "699.0"
						},
						{
							"name": "weight",
							"unit": {
								"name": "kg",
								"label": {
									"en": "Kg",
									"bn": "কেজি"
								}
							},
							"value": "688.0"
						}
					]
				}
			],
			"fromLocation": {
				"address": "Barisal, Bangladesh",
				"latitude": 22.7010021,
				"longitude": 90.35345110000002,
				"addressLocale": {
					"bn": "Barisal, Bangladesh",
					"en": "Barisal, Bangladesh"
				}
			},
			"toLocation": {
				"address": "Sylhet M. A. G. Osmani Medical College, Medical College Road, Sylhet, Bangladesh",
				"latitude": 24.9006252,
				"longitude": 91.85458729999999,
				"addressLocale": {
					"bn": "Sylhet M. A. G. Osmani Medical College, Medical College Road, Sylhet, Bangladesh",
					"en": "Sylhet M. A. G. Osmani Medical College, Medical College Road, Sylhet, Bangladesh"
				}
			},
			"additionalNotes": "tamjid akta mal khor",
			"createdAt": "2022-01-25T05:25:54.678Z",
			"stoppages": [
				{
					"address": "Sylhet Bus Stand, Sylhet, Bangladesh",
					"latitude": 24.8821884,
					"longitude": 91.8716934,
					"addressLocale": {
						"bn": "Sylhet Bus Stand, Sylhet, Bangladesh",
						"en": "Sylhet Bus Stand, Sylhet, Bangladesh"
					}
				}
			],
			"minPrice": 2588,
			"maxPrice": 99669,
			"progressPercent": 0,
			"advancedPayment": 0,
			"loadingAgent": {
				"userId": "01FT2M9GFJ7FYH48THK9J9PJAF",
				"email": null,
				"phone": "+8801767889900",
				"fullName": "taxim",
				"gender": "male",
				"role": "shipper_agent",
				"profilePicture": null
			},
			"unloadingAgent": {},
			"stage": "look_at_bid",
			"shipper": {
				"userId": "01FT2M4RDYS4X07P7DH638179G",
				"email": "effhhknn@gmail.com",
				"phone": "+8801709090909",
				"fullName": "tazim",
				"gender": "male",
				"role": "shipper",
				"profilePicture": null
			},
			"kam": {
				"userId": "01FT0855XB5GB33B4ACKVMDN1C",
				"email": "riyad2_ch3@gmail.com",
				"phone": "+8801754130237",
				"fullName": "sazib",
				"gender": "male",
				"role": "kam",
				"profilePicture": null
			},
			"bookingStatus": "requested",
			"createdBy": {
				"role": "shipper",
				"email": "effhhknn@gmail.com",
				"phone": "+8801709090909",
				"gender": "male",
				"userId": "01FT2M4RDYS4X07P7DH638179G",
				"fullName": "tazim",
				"createdAt": "2022-01-23T04:47:07.195Z",
				"profilePicture": null
			}
		},
        ]
}	
```
### 1.2.2 Single booking details for admin
* **Description:** "admin" or "kam" get a booking details using `{bookingId}`. Admin can checkout all the details as responsed.
* **Permission role**: admin and kam
* **Method**:`GET`
* **Api path**:`/admin/booking/{bookingId}`
* **Headers**: `Authorization` : `Bearer {access_token}`
* **Request Body**: `no request body`
* **Response**:
```status_code: 200```
```json=
{
	"success": true,
	"message": "Booking gets successfully.",
	"data": {
		"id": 70,
		"truckQuantity": 2,
		"truckType": {
			"id": 42,
			"truckTypeEn": "12FT Open Truck",
			"truckTypeBn": "১২ ফুট খোলা ট্রাক",
			"status": "active"
		},
		"truckCategory": {
			"id": 3,
			"truckCategoryEn": "Trailer",
			"truckCategoryBn": "ট্রেইলার",
			"status": "active"
		},
		"fromLocation": {
			"address": "Khulna University",
			"latitude": 22.8022039,
			"longitude": 89.5339231,
			"addressLocale": {
				"bn": "Khulna University",
				"en": "Khulna University"
			}
		},
		"toLocation": {
			"address": "Khulna University",
			"latitude": 22.8022039,
			"longitude": 89.5339231,
			"addressLocale": {
				"bn": "Khulna University",
				"en": "Khulna University"
			}
		},
		"fromDistrict": {
			"address": "Khulna, Khulna, Bangladesh",
			"latitude": 22.815774,
			"longitude": 89.568679,
			"addressLocale": {
				"bn": "খুলনা",
				"en": "Khulna"
			}
		},
		"toDistrict": {
			"address": "Khulna, Khulna, Bangladesh",
			"latitude": 22.815774,
			"longitude": 89.568679,
			"addressLocale": {
				"bn": "খুলনা",
				"en": "Khulna"
			}
		},
		"additionalNotes": "",
		"createdAt": "2022-01-11T05:36:24.998Z",
		"stoppages": [
			{
				"address": "Chittagong Railway Staion",
				"latitude": 22.3338404,
				"longitude": 91.8300933,
				"addressLocale": {
					"bn": "Chittagong Railway Staion",
					"en": "Chittagong Railway Staion"
				}
			}
		],
		"minPrice": 12345,
		"maxPrice": 1234567,
		"loadingAgent": {},
		"unloadingAgent": {},
		"shipper": {
			"userId": "01FR1XWBHZE7MPG4PAEGT5M3WZ",
			"email": "aeffhhk@gmail.com",
			"phone": "+8801799999999",
			"fullName": "aa",
			"gender": "male",
			"role": "shipper"
		},
		"kam": {
			"userId": "01FRMT9G4YA91ZH53E560P2PRH",
			"email": "e255rdch1@gmail.com",
			"phone": "+8801754137298",
			"fullName": "2ty1dch1",
			"gender": "male",
			"role": "kam"
		}
	}
}
```
### 1.3 Booking fare history created by admin
* **Description:** "admin" and "kam" create a booking fare history against a booking for shipper using `{bookingId}` which aids a shipper to acknowledge market rate while bidding. 
* **Permission role**: admin and kam
* **Method**:`POST`
* **Api path**:`/booking/fare-history`
* **Headers**: `Authorization` : `Bearer {access_token}`
* **Input Field**:

| Field Name | Sample Data | Required|
| -------- | -------- |--------|
| `baseAmount`: `number`| `5000` |`true`
| `marginAmount`: `number` | `383` |`true`|
| `vatPercent`: `number` | `4` |`true`|
| `aitPercent`: `number` |`1`|`true`|
|`bookingId`:`number`|`63`|`true`|

* **Request Body**:
```json=
  {
	"baseAmount": 5000,
	"marginAmount": 383,
	"vatPercent": 4,
	"aitPercent": 1,
	"bookingId": 63
}
```
* **Response**:

```status_code: 201```
```json=
{
	"success": true,
	"message": "Fare amount submitted to shipper shipper.",
	"data": {
		"id": 25,
		"baseAmount": 5000,
		"fareAmount": 5650,
		"marginPercent": 8,
		"marginAmount": 400,
		"vatPercent": 4,
		"vatAmount": 200,
		"aitPercent": 1,
		"aitAmount": 50,
		"fareHistoryStatus": "pending"
	}
}
```
### 1.4 Booking fare status update for admin
* **Description:** "Admin" and "kam" update booking fare by updating fare history. They will use `{bookingId}` to update the fare history. `fareHistoryStatus` will be a string which will be updated by admin.
* **Permission role**: admin and kam
* **Method**:`PUT`
* **Api path**:`/booking/fare-history/{bookingId}`
* **Headers**: `Authorization` : `Bearer {access_token}`
* **Input Field**:

| Field Name | Sample Data | Required|
| -------- | -------- |--------|
| `fareHistoryStatus`: `string`| `pending` `admin_approved` `rejected` |`true`| 

* **Request Body**:
```json=
{
	"fareHistoryStatus": "admin_approved"
}
```
* **Response**:

```status_code: 200```
```json=
{
	"success": false,
	"message": "Fare history status is already",
	"data": {}
}
```
### 1.5 Booking bidding list for kam
* **Description:** "kam" gets a list of biddings belongs to a booking using `{bookingId}`.
* **Permission role**: kam
* **Method**:`GET`
* **Api path**:`/kam/booking/{bookingId}/biddings`
* **Headers**: `Authorization` : `Bearer {access_token}`
* **Request Body**:
`no request body`
* **Response**:
```status_code: 200```
```json=
{
	"success": true,
	"message": "Booking biddings get successfully.",
	"data": {
		"id": 5,
		"truckQuantity": 15,
		"remainingTrucks": 15,
		"truckType": {
			"id": 38,
			"status": "active",
			"truckTypeBn": "২০ ফুট খোলা ট্রাক",
			"truckTypeEn": "20FT Open Truck"
		},
		"fromLocation": {
			"address": "Mongla Port, Mongla, Bangladesh",
			"latitude": 22.49046969999999,
			"longitude": 89.59160519999999,
			"addressLocale": {
				"bn": "Mongla Port",
				"en": "Mongla Por"
			}
		},
		"toLocation": {
			"address": "Jessore Post Office",
			"latitude": 23.163687,
			"longitude": 89.208563,
			"addressLocale": {
				"bn": "যশর পোস্ট অফিস, যশর সদর, যশর সদর, যশর",
				"en": "Jessore Post Office, Jessore Sadar, Jessore"
			}
		},
		"fromDistrict": {
			"address": "Bagerhat, Khulna, Bangladesh",
			"latitude": 22.651568,
			"longitude": 89.785938,
			"addressLocale": {
				"bn": "বাগেরহাট",
				"en": "Bagerhat"
			}
		},
		"toDistrict": {
			"address": "Jessore, Khulna, Bangladesh",
			"latitude": 23.16643,
			"longitude": 89.2081126,
			"addressLocale": {
				"bn": "যশোর",
				"en": "Jessore"
			}
		},
		"additionalNotes": "",
		"createdAt": "2022-01-07T05:22:13.793Z",
		"stoppages": [],
		"minPrice": 1331.333,
		"maxPrice": 13412,
		"bookingStatus": "requested",
		"biddings": [],
		"company": {
			"id": 1,
			"name": "steeltes",
			"createdAt": "2021-12-29T01:34:45.113Z",
			"companyLat": 120.213123,
			"companyLng": -72.1231,
			"companySuburb": {
				"nameBn": "ঢাকা",
				"nameEn": "Dhaka"
			},
			"companyAddress": {
				"nameBn": "ঢাকা",
				"nameEn":  "Dhaka"
			},
			"companyCountry": {
				"nameBn": "বাংলাদেশ",
				"nameEn": "Bangladesh"
			},
			"companyDistrict": {
				"nameBn": "ঢাকা",
				"nameEn": "Dhaka"
			},
			"companyDivision": {
				"nameBn": "ঢাকা",
				"nameEn": "Dhaka"
			}
		}
	}
}
```
### 1.6 Bidding confirmation create for kam
* **Description:** kam create a bidding confirmation thread against a booking using `{bookingId}`, `{biddingId}`. He will define number of truck as `{numberOfTruck}`.
* **Permission role**: admin and kam
* **Method**:`POST`
* **Api path**:`/kam/booking/`
* **Headers**: `Authorization` : `Bearer {access_token}`
* **Input Field**:

| Field Name | Sample Data | Required|
| -------- | -------- |--------|
| `bookingId`: `number`| `81` |`true`
| `biddingId`: `number` | `5` |`true`|
| `numberOfTrucks`: `number` | `1` |`false`|
| `proposedAmountPerTruck`: `number` | `400` |`false`|
* **Request Body**:
```json=
{
	"bookingId": 81,
	"biddingId": 5,
	"numberOfTrucks": 1
}
```
* **Response**:

```status_code: 201```
```json=
{
	"success": true,
	"message": "The bidding has been confirmed.",
	"data": {}
}
```
### 1.7 Total Booking list for kam
* **Description:** Kam gets all the details till date with approved status. 
* **Permission role**: kam
* **Method**:`GET`
* **Api path**:`/kam/booking/`
* **Headers**: `Authorization` : `Bearer {access_token}`
* **Input Query**:

 Query Name | Sample Data |
| -------- | -------- |
| `page`: `number` | `1` |
| `limit`: `number` | `10` |
| `stage`: `string`| `look_at_bid`, `quote_shipper`,`select_vendor`, `get_truck_info`, `trip_activated`,`trip_completed` |
| `bookingStatus`: `string`| `requested`, `scheduled`,`activated`, `cancelled`, `completed`,`expired` |
|`companyId`:`number`|`1`
| `fromDate`:`Date` | `2022-01-10`|
| `toDate`:`Date`|`2022-01-17`
* **Request Body**: `no request body`
* **Response**:
```status_code: 200```
```json=
{
	"success": true,
	"message": "Booking list gets successfully.",
	"count": 2,
	"data": [
        {
            "id": 96,
            "truckQuantity": 4,
            "remainingTrucks": 4,
            "truckType": {
                "id": 38,
                "status": "active",
                "truckTypeBn": "২০ ফুট খোলা ট্রাক",
                "truckTypeEn": "20FT Open Truck"
            },
            "fromLocation": {
                "address": "Khulna University",
                "latitude": 22.8022039,
                "longitude": 89.5339231,
                "addressLocale": {
                    "bn": "Khulna University",
                    "en": "Khulna University"
                }
            },
            "toLocation": {
                "address": "Cox's Bazar Airport.",
                "latitude": 21.4507,
                "longitude": 91.9667,
                "addressLocale": {
                    "bn": "Cox's Bazar Airport",
                    "en": "Cox's Bazar Airport."
                }
            },
            "fromDistrict": {
                "address": "Khulna, Khulna, Bangladesh",
                "latitude": 22.815774,
                "longitude": 89.568679,
                "addressLocale": {
                    "bn": "খুলনা",
                    "en": "Khulna"
                }
            },
            "toDistrict": {
                "address": "Cox's Bazar, Chittagong, Bangladesh",
                "latitude": 21.4272,
                "longitude": 92.0058,
                "addressLocale": {
                    "bn": "কক্সবাজার",
                    "en": "Cox's Bazar"
                }
            },
            "additionalNotes": "",
            "createdAt": "2022-01-13T06:12:04.573Z",
            "stoppages": [
                {
                    "address": "Barishal Launch Ghat",
                    "latitude": 22.6999559,
                    "longitude": 90.3750962,
                    "addressLocale": {
                        "bn": "Barishal Launch",
                        "en": "Barishal Launch Ghat"
                    }
                },
                {
                    "address": "Feni Central High School (FCHS )",
                    "latitude": 23.0063522,
                    "longitude": 91.40222,
                    "addressLocale": {
                        "bn": "Barishal Launch",
                        "en": "Feni Central High School (FCHS )"
                    }
                }
            ],
            "minPrice": 1000,
            "maxPrice": 2005,
            "bookingStatus": "requested",
            "company": {
                "id": 1,
                "name": "steeltes",
                "createdAt": "2021-12-29T01:34:45.113Z",
                "companyLat": 120.213123,
                "companyLng": -72.1231,
                "companySuburb": {
                    "nameBn": "ঢাকাs",
                    "nameEn": "bang"
                },
                "companyAddress": {
                    "nameBn": "ঢাsকা",
                    "nameEn": "pasdasdassdad,asdasdaasdasadds"
                },
                "companyCountry": {
                    "nameBn": "বাংলাদেশ",
                    "nameEn": "asdasdasdadasdas"
                },
                "companyDistrict": {
                    "nameBn": "ঢাকাs",
                    "nameEn": "sssss"
                },
                "companyDivision": {
                    "nameBn": "ঢাকা",
                    "nameEn": "sdsdadada"
                }
            }
        },
        {
            "id": 95,
            "truckQuantity": 15,
            "remainingTrucks": 15,
            "truckType": {
                "id": 38,
                "status": "active",
                "truckTypeBn": "২০ ফুট খোলা ট্রাক",
                "truckTypeEn": "20FT Open Truck"
            },
            "fromLocation": {
                "address": "Mongla Port, Mongla, Bangladesh",
                "latitude": 22.49046969999999,
                "longitude": 89.59160519999999,
                "addressLocale": {
                    "bn": "Mongla Port",
                    "en": "Mongla Por"
                }
            },
            "toLocation": {
                "address": "Jessore Post Office",
                "latitude": 23.163687,
                "longitude": 89.208563,
                "addressLocale": {
                    "bn": "যশর পোস্ট অফিস, যশর সদর, যশর সদর, যশর",
                    "en": "Jessore Post Office, Jessore Sadar, Jessore"
                }
            },
            "fromDistrict": {
                "address": "Bagerhat, Khulna, Bangladesh",
                "latitude": 22.651568,
                "longitude": 89.785938,
                "addressLocale": {
                    "bn": "বাগেরহাট",
                    "en": "Bagerhat"
                }
            },
            "toDistrict": {
                "address": "Jessore, Khulna, Bangladesh",
                "latitude": 23.16643,
                "longitude": 89.2081126,
                "addressLocale": {
                    "bn": "যশোর",
                    "en": "Jessore"
                }
            },
            "additionalNotes": "",
            "createdAt": "2022-01-13T05:41:09.497Z",
            "stoppages": [],
            "minPrice": 1331.333,
            "maxPrice": 13412,
            "bookingStatus": "requested",
            "company": {
                "id": 1,
                "name": "steeltes",
                "createdAt": "2021-12-29T01:34:45.113Z",
                "companyLat": 120.213123,
                "companyLng": -72.1231,
                "companySuburb": {
                    "nameBn": "ঢাকাs",
                    "nameEn": "bang"
                },
                "companyAddress": {
                    "nameBn": "ঢাsকা",
                    "nameEn": "pasdasdassdad,asdasdaasdasadds"
                },
                "companyCountry": {
                    "nameBn": "বাংলাদেশ",
                    "nameEn": "asdasdasdadasdas"
                },
                "companyDistrict": {
                    "nameBn": "ঢাকাs",
                    "nameEn": "sssss"
                },
                "companyDivision": {
                    "nameBn": "ঢাকা",
                    "nameEn": "sdsdadada"
                }
            }
        },
}
```
### 1.8 Trips list for kam
* **Description:** Kam gets all the trips and trips status with indivitual id after approving the bidding. 
* **Permission role**: kam
* **Method**:`GET`
* **Api path**:`/kam/booking/{bookingId}/trips`
* **Headers**: `Authorization` : `Bearer {access_token}`
* **Request Body**: `no request body`
* **Response**:
```status_code: 200```
```json=
{
 "success": true,
	"message": "Booking trips get successfully.",
	"data": {
		"id": 11,
		"truckQuantity": 15,
		"remainingTrucks": 15,
		"truckType": {
			"id": 38,
			"status": "active",
			"truckTypeBn": "২০ ফুট খোলা ট্রাক",
			"truckTypeEn": "20FT Open Truck"
		},
		"fromLocation": {
			"address": "Mongla Port, Mongla, Bangladesh",
			"latitude": 22.49046969999999,
			"longitude": 89.59160519999999,
			"addressLocale": {
				"bn": "Mongla Port",
				"en": "Mongla Por"
			}
		},
		"toLocation": {
			"address": "Jessore Post Office",
			"latitude": 23.163687,
			"longitude": 89.208563,
			"addressLocale": {
				"bn": "যশর পোস্ট অফিস, যশর সদর, যশর সদর, যশর",
				"en": "Jessore Post Office, Jessore Sadar, Jessore"
			}
		},
		"fromDistrict": {
			"address": "Bagerhat, Khulna, Bangladesh",
			"latitude": 22.651568,
			"longitude": 89.785938,
			"addressLocale": {
				"bn": "বাগেরহাট",
				"en": "Bagerhat"
			}
		},
		"toDistrict": {
			"address": "Jessore, Khulna, Bangladesh",
			"latitude": 23.16643,
			"longitude": 89.2081126,
			"addressLocale": {
				"bn": "যশোর",
				"en": "Jessore"
			}
		},
		"additionalNotes": "",
		"createdAt": "2022-01-07T05:29:38.660Z",
		"stoppages": [],
		"minPrice": 1331.333,
		"maxPrice": 13412,
		"bookingStatus": "requested",
		"biddings": [],
		"trips": [],
		"company": {
			"id": 1,
			"name": "steeltes",
			"createdAt": "2021-12-29T01:34:45.113Z",
			"companyLat": 120.213123,
			"companyLng": -72.1231,
			"companySuburb": {
				"nameBn": "ঢাকাs",
				"nameEn": "bang"
			},
			"companyAddress": {
				"nameBn": "ঢাsকা",
				"nameEn": "pasdasdassdad,asdasdaasdasadds"
			},
			"companyCountry": {
				"nameBn": "বাংলাদেশ",
				"nameEn": "asdasdasdadasdas"
			},
			"companyDistrict": {
				"nameBn": "ঢাকাs",
				"nameEn": "sssss"
			},
			"companyDivision": {
				"nameBn": "ঢাকা",
				"nameEn": "sdsdadada"
			}
		}
	}
}   
}
```
* **Response**:

```status_code: 201```
```json=
{
    "success": true,
    "message": "Booking created successfully.",
    "data": {
        "id": 97,
        "truckQuantity": 15,
        "truckType": {
            "id": 38,
            "truckTypeEn": "20FT Open Truck",
            "truckTypeBn": "২০ ফুট খোলা ট্রাক",
            "status": "active"
        },
        "truckCategory": {
            "id": 3,
            "truckCategoryEn": "Trailer",
            "truckCategoryBn": "ট্রেইলার",
            "status": "active"
        },
        "bookingItems": [
            {
                "itemId": 6,
                "name": "cement",
                "label": {
                    "en": "Cement",
                    "bn": "সিমেন্ট"
                },
                "measurements": [
                    {
                        "name": "quantity",
                        "unit": {
                            "name": "bags",
                            "label": {
                                "en": "Bags",
                                "bn": "ব্যাগ"
                            }
                        },
                        "value": 50
                    }
                ]
            }
        ],
        "fromLocation": {
            "address": "Mongla Port, Mongla, Bangladesh",
            "latitude": 22.49046969999999,
            "longitude": 89.59160519999999,
            "addressLocale": {
                "bn": "Mongla Port",
                "en": "Mongla Por"
            }
        },
        "toLocation": {
            "address": "Jessore Post Office",
            "latitude": 23.163687,
            "longitude": 89.208563,
            "addressLocale": {
                "bn": "যশর পোস্ট অফিস, যশর সদর, যশর সদর, যশর",
                "en": "Jessore Post Office, Jessore Sadar, Jessore"
            }
        },
        "fromDistrict": {
            "address": "Bagerhat, Khulna, Bangladesh",
            "latitude": 22.651568,
            "longitude": 89.785938,
            "addressLocale": {
                "bn": "বাগেরহাট",
                "en": "Bagerhat"
            }
        },
        "toDistrict": {
            "address": "Jessore, Khulna, Bangladesh",
            "latitude": 23.16643,
            "longitude": 89.2081126,
            "addressLocale": {
                "bn": "যশোর",
                "en": "Jessore"
            }
        },
        "additionalNotes": "",
        "createdAt": "2022-01-13T08:33:04.884Z",
        "stoppages": [],
        "minPrice": 1331.333,
        "maxPrice": 13412,
        "loadingAgent": {
            "userId": "01FR1Y19Y34YVCT1TWZCD7TZEY",
            "email": "aeffhhkn@gmail.com",
            "phone": "+8801799999979",
            "fullName": "aa",
            "gender": "male",
            "role": "shipper"
        },
        "unloadingAgent": {
            "userId": "01FR1Y19Y34YVCT1TWZCD7TZEY",
            "email": "aeffhhkn@gmail.com",
            "phone": "+8801799999979",
            "fullName": "aa",
            "gender": "male",
            "role": "shipper"
        },
        "shipper": {
            "userId": "01FQTZS6KFM38XYX6EVXC43HXH",
            "email": "syedmusa00@gmail.comt",
            "phone": "+8801745778892",
            "fullName": "syed musa tazim",
            "gender": "male",
            "role": "shipper"
        },
        "kam": {
            "userId": "01FRMT9G4YA91ZH53E560P2PRH",
            "email": "e255rdch1@gmail.com",
            "phone": "+8801754137298",
            "fullName": "2ty1dch1",
            "gender": "male",
            "role": "kam"
        },
        "bookingStatus": "activated"
    }
}
```
### 1.9 Trip list for kam
* **Description:** Kam gets all the trips till date with `{bookingStatus}`. 
* **Permission role**: kam
* **Method**:`GET`
* **Api path**:`/kam/booking/trips`
* **Headers**: `Authorization` : `Bearer {access_token}`
* **Input Query**:

 Query Name | Sample Data |
| -------- | -------- |
| `page`: `number` | `1` |
| `limit`: `number` | `10` |
| `stage`: `string`| `look_at_bid`, `quote_shipper`,`select_vendor`, `get_truck_info`, `trip_activated`,`trip_completed` |
| `bookingStatus`: `string`| `requested`, `scheduled`,`activated`, `cancelled`, `completed`,`expired` |
|`companyId`:`number`|`1`|
| `fromDate`:`Date` | `2022-01-10`|
| `toDate`:`Date`|`2022-01-17`
* **Request Body**: `no request body`
* **Response**:
```status_code: 200```
```json=
{
	"success": true,
	"message": "Trip list gets successfully.",
	"count": 8,
	"data": [
		{
			"id": 27,
			"fareAmount": 9052,
			"demurrage": 0,
			"totalAmount": 9052,
			"startedAt": null,
			"endedAt": null,
			"status": "active",
			"booking": {
				"id": 132,
				"truckQuantity": 1,
				"remainingTrucks": 0,
				"truckType": {
					"id": 47,
					"status": "active",
					"truckTypeBn": "ফ্ল্যাট বেড ট্রেলার: ৫ এক্সেল ৪০ ফুট",
					"truckTypeEn": "Flat Bed Trailer: 5XL 40FT"
				},
				"fromLocation": {
					"address": "Dhaka Medical College Hospital",
					"latitude": 23.7260553,
					"longitude": 90.3975292,
					"addressLocale": {
						"bn": "Dhaka Medical College Hospital",
						"en": "Dhaka Medical College Hospital"
					}
				},
				"toLocation": {
					"address": "Khulna Railway Station",
					"latitude": 22.8202771,
					"longitude": 89.5579797,
					"addressLocale": {
						"bn": "Khulna Railway Station",
						"en": "Khulna Railway Station"
					}
				},
				"fromDistrict": {
					"address": "Dhaka, Dhaka, Bangladesh",
					"latitude": 23.7115253,
					"longitude": 90.4111451,
					"addressLocale": {
						"bn": "ঢাকা",
						"en": "Dhaka"
					}
				},
				"toDistrict": {
					"address": "Khulna, Khulna, Bangladesh",
					"latitude": 22.815774,
					"longitude": 89.568679,
					"addressLocale": {
						"bn": "খুলনা",
						"en": "Khulna"
					}
				},
				"additionalNotes": "",
				"createdAt": "2022-01-17T11:56:07.081Z",
				"stoppages": [],
				"minPrice": 2300,
				"maxPrice": 12000,
				"bookingStatus": "completed",
				"progressPercent": 100,
				"advancedPayment": 0,
				"company": {
					"id": 1,
					"name": "steeltes",
					"createdAt": "2021-12-29T01:34:45.113Z",
					"companyLat": 120.213123,
					"companyLng": -72.1231,
					"companyAddress": {
						"nameBn": "ঢাsকা",
						"nameEn": "pasdasdassdad,asdasdaasdasadds"
					},
					"companyPlaceId": "ChIJrTasdasdaLr-GyuEmsRBfy61i59si0"
				},
				"stage": "trip_completed"
			}
		}
	]
}
```
### 1.10 Single trip details for kam
* **Description:** Kam gets single trip details from a booking till date with approve status. 
* **Permission role**: kam
* **Method**:`GET`
* **Api path**: `/kam/booking/{bookingId}/trips/{tripId}`
* **Headers**: `Authorization` : `Bearer {access_token}`
* **Input Query**:

 Query Name | Sample Data |
| -------- | -------- |
| `page`: `number` | `1` |
| `limit`: `number` | `10` |
| `fromDate`:`Date` | `2022-01-10`|
| `toDate`:`Date`|`2022-01-17`
* **Request Body**: `no request body`
* **Response**:
```status_code: 200```
```json=
{
	"success": true,
	"message": "Booking trips get successfully.",
	"data": {
		"id": 132,
		"truckQuantity": 1,
		"remainingTrucks": 0,
		"truckType": {
			"id": 47,
			"status": "active",
			"truckTypeBn": "ফ্ল্যাট বেড ট্রেলার: ৫ এক্সেল ৪০ ফুট",
			"truckTypeEn": "Flat Bed Trailer: 5XL 40FT"
		},
		"fromLocation": {
			"address": "Dhaka Medical College Hospital",
			"latitude": 23.7260553,
			"longitude": 90.3975292,
			"addressLocale": {
				"bn": "Dhaka Medical College Hospital",
				"en": "Dhaka Medical College Hospital"
			}
		},
		"toLocation": {
			"address": "Khulna Railway Station",
			"latitude": 22.8202771,
			"longitude": 89.5579797,
			"addressLocale": {
				"bn": "Khulna Railway Station",
				"en": "Khulna Railway Station"
			}
		},
		"fromDistrict": {
			"address": "Dhaka, Dhaka, Bangladesh",
			"latitude": 23.7115253,
			"longitude": 90.4111451,
			"addressLocale": {
				"bn": "ঢাকা",
				"en": "Dhaka"
			}
		},
		"toDistrict": {
			"address": "Khulna, Khulna, Bangladesh",
			"latitude": 22.815774,
			"longitude": 89.568679,
			"addressLocale": {
				"bn": "খুলনা",
				"en": "Khulna"
			}
		},
		"additionalNotes": "",
		"createdAt": "2022-01-17T11:56:07.081Z",
		"stoppages": [],
		"minPrice": 2300,
		"maxPrice": 12000,
		"bookingStatus": "completed",
		"progressPercent": 100,
		"advancedPayment": 0,
		"biddings": [
			{
				"id": 61,
				"numberOfTrucks": 1,
				"proposedAmountPerTruck": 8007,
				"proposedAmount": 8007,
				"confirmed": false,
				"createdAt": "2022-01-17T11:56:57.541Z"
			},
			{
				"id": 62,
				"numberOfTrucks": 1,
				"proposedAmountPerTruck": 7907,
				"proposedAmount": 7907,
				"confirmed": false,
				"createdAt": "2022-01-17T11:57:52.170Z"
			},
			{
				"id": 63,
				"numberOfTrucks": 1,
				"proposedAmountPerTruck": 7007,
				"proposedAmount": 7007,
				"confirmed": true,
				"createdAt": "2022-01-17T11:58:17.003Z"
			}
		],
		"trips": [
			{
				"id": 27,
				"fareAmount": 9052,
				"demurrage": 0,
				"totalAmount": 9052,
				"startedAt": null,
				"truck": {
					"id": 51,
					"truckType": {
						"id": 47,
						"status": "active",
						"truckTypeBn": "ফ্ল্যাট বেড ট্রেলার: ৫ এক্সেল ৪০ ফুট",
						"truckTypeEn": "Flat Bed Trailer: 5XL 40FT"
					},
					"truckModelNo": null,
					"truckCategory": {
						"id": 4,
						"status": "active",
						"truckCategoryBn": "কাভার্ড ভ্যান",
						"truckCategoryEn": "Covered Van"
					},
					"licensePlateNoBn": "ঢাকা মেট্রো অ ১৭৭৬৬০",
					"licensePlateNoEn": "ঢাকা মেট্রো অ ১৭৭৬৬০",
					"truckAvailability": "available",
					"licensePlateNoTextBn": "ঢাকা মেট্রো - অ - ১৭৭৬৬০",
					"licensePlateNoTextEn": "Dhaka Metro - AW - 177660"
				},
				"driver": {
					"id": 3,
					"phone": "+8801631699718",
					"fullName": "Mahbub alam ",
					"createdAt": "2021-12-27T07:20:12.739Z",
					"driverAvailability": "available"
				},
				"endedAt": null,
				"status": "active",
				"tripStatus": "completed",
				"documents": []
			}
		],
		"company": {
			"id": 1,
			"name": "steeltes",
			"createdAt": "2021-12-29T01:34:45.113Z",
			"companyLat": 120.213123,
			"companyLng": -72.1231,
			"companyAddress": {
				"nameBn": "ঢাsকা",
				"nameEn": "pasdasdassdad,asdasdaasdasadds"
			},
			"companyPlaceId": "ChIJrTasdasdaLr-GyuEmsRBfy61i59si0"
		},
		"stage": "trip_completed"
	}
}
```
### 1.11 Booking create for shipper
* **Description:** Shipper creates a booking. 
* **Permission role**: shipper
* **Method**:`POST`
* **Api path**:`/shipper/booking/`
* **Headers**: `Authorization` : `Bearer {access_token}`
* **Input Field**:

| Field Name | Sample Data | Required|
| -------- | -------- |--------|
|`truckTypeId`: `number`|`38`|`true`|
|`truckQuantity`:`number`|`4`|`true`|
| `pickupDate`: `date` | `2022-01-10` |`true`|
| `pickupTime`: `object` |`{"start": "12:00","end": "06:00"}`|`true`|
| `companyId`: `number`| `1` |`true`|
|`bookingItems`:`object[]`|`[{"id": 6, "measurements": [{ "name": "quantity", "unit": "bags", "value": 50 } ] }]`|`true`|
|`fromLocation`:`object`|`{"address": "Khulna University","addressLocale": {"bn": "Khulna University","en": "Khulna University"}, "latitude": 22.8022039,"longitude": 89.5339231}`|`true`|
|`toLocation`:`object` |`{"address": "Cox's Bazar Airport.","addressLocale": {"bn": "Cox's Bazar Airport","en": "Cox's Bazar Airport."},"latitude": 21.4507,"longitude": 91.9667}`|`true`|
|`minPrice`:`number`|`1000`|`true`|
|`maxPrice`:`number`|`2005`|`true`|
|`stoppages`:`object[]`|`[{"address": "Barishal Launch Ghat", "addressLocale": {"bn": "Barishal Launch", "en": "Barishal Launch Ghat"}, "latitude": 22.6999559,"longitude": 90.3750962}, { "address": "Feni Central High School (FCHS )", "addressLocale": {"bn": "Barishal Launch", "en": "Feni Central High School (FCHS )"},"latitude": 23.0063522,"longitude": 91.40222}]`|`false`|
|`loadingAgentId`:`string`|`01FR1Y19Y34YVCT1TWZCD7TZEY`|`false`|
|`unloadingAgentId`:`string`|`01FR1Y19Y34YVCT1TWZCD7TZEY`|`true`|

* **Request Body**:
```json=
    {
        "pickupDate": "2022-01-10",
        "pickupTime": {
        "start": "12:00",
        "end": "06:00"
        },
        "fromLocation": {
        "address": "Khulna University",
        "addressLocale": {
            "bn": "Khulna University",
            "en": "Khulna University"
        },
        "latitude": 22.8022039,
        "longitude": 89.5339231
        },
        "companyId": 1,
        "toLocation": {
        "address": "Cox's Bazar Airport.",
        "addressLocale": {
            "bn": "Cox's Bazar Airport",
            "en": "Cox's Bazar Airport."
        },
        "latitude": 21.4507,
        "longitude": 91.9667
        },
        "minPrice": 1000,
        "maxPrice": 2005,
        "truckTypeId": 38,
        "truckQuantity": 4,
        "bookingItems": [
        {
            "id": 6,
            "measurements": [
                {
                    "name": "quantity",
                    "unit": "bags",
                    "value": 50
                }
            ]
        }
        ],
        "stoppages": [
        {
            "address": "Barishal Launch Ghat",
            "addressLocale": {
                "bn": "Barishal Launch",
                "en": "Barishal Launch Ghat"
            },
            "latitude": 22.6999559,
            "longitude": 90.3750962
        },
        {
            "address": "Feni Central High School (FCHS )",
            "addressLocale": {
                "bn": "Barishal Launch",
                "en": "Feni Central High School (FCHS )"
            },
            "latitude": 23.0063522,
            "longitude": 91.40222
        }
        ],
        "loadingAgentId": "01FR1Y19Y34YVCT1TWZCD7TZEY",
        "unloadingAgentId": "01FR1Y19Y34YVCT1TWZCD7TZEY"
    }
```
* **Response**:

```status_code: 201```
```json=
{
    "success": true,
    "message": "Booking create successfully.",
    "data": {
    "id": 96,
    "truckQuantity": 4,
    "truckType": {
        "id": 38,
        "truckTypeEn": "20FT Open Truck",
        "truckTypeBn": "২০ ফুট খোলা ট্রাক",
        "status": "active"
    },
    "truckCategory": {
        "id": 3,
        "truckCategoryEn": "Trailer",
        "truckCategoryBn": "ট্রেইলার",
        "status": "active"
    },
    "bookingItems": [
        {
            "itemId": 6,
            "name": "cement",
            "label": {
                "en": "Cement",
                "bn": "সিমেন্ট"
            },
            "measurements": [
                {
                    "name": "quantity",
                    "unit": {
                        "name": "bags",
                        "label": {
                            "en": "Bags",
                            "bn": "ব্যাগ"
                        }
                    },
                    "value": 50
                }
            ]
        }
    ],
    "fromLocation": {
        "address": "Khulna University",
        "latitude": 22.8022039,
        "longitude": 89.5339231,
        "addressLocale": {
            "bn": "Khulna University",
            "en": "Khulna University"
        }
    },
    "toLocation": {
        "address": "Cox's Bazar Airport.",
        "latitude": 21.4507,
        "longitude": 91.9667,
        "addressLocale": {
            "bn": "Cox's Bazar Airport",
            "en": "Cox's Bazar Airport."
        }
    },
    "fromDistrict": {
        "address": "Khulna, Khulna, Bangladesh",
        "latitude": 22.815774,
        "longitude": 89.568679,
        "addressLocale": {
            "bn": "খুলনা",
            "en": "Khulna"
        }
    },
    "toDistrict": {
        "address": "Cox's Bazar, Chittagong, Bangladesh",
        "latitude": 21.4272,
        "longitude": 92.0058,
        "addressLocale": {
            "bn": "কক্সবাজার",
            "en": "Cox's Bazar"
        }
    },
    "additionalNotes": "",
    "createdAt": "2022-01-13T06:12:04.573Z",
    "stoppages": [
        {
            "address": "Barishal Launch Ghat",
            "latitude": 22.6999559,
            "longitude": 90.3750962,
            "addressLocale": {
                "bn": "Barishal Launch",
                "en": "Barishal Launch Ghat"
            }
        },
        {
            "address": "Feni Central High School (FCHS )",
            "latitude": 23.0063522,
            "longitude": 91.40222,
            "addressLocale": {
                "bn": "Barishal Launch",
                "en": "Feni Central High School (FCHS )"
            }
        }
    ],
    "minPrice": 1000,
    "maxPrice": 2005,
    "loadingAgent": {},
    "unloadingAgent": {},
    "shipper": {
        "userId": "01FR4YRSNH7930GJ13A1T34AZ6",
        "email": "4aeffh1hknn@gmail.com",
        "phone": "+8801676554422",
        "fullName": "aa",
        "gender": "male",
        "role": "shipper"
    },
    "kam": {
        "userId": "01FRMT9G4YA91ZH53E560P2PRH",
        "email": "e255rdch1@gmail.com",
        "phone": "+8801754137298",
        "fullName": "2ty1dch1",
        "gender": "male",
        "role": "kam"
    }
    }
}
```
### 1.12 Booking list for a shipper
* **Description:** Shipper gets bidding result for his booking with `{bookingStatus}`. 
* **Permission role**: shipper
* **Method**:`GET`
* **Api path**:`/shipper/booking/`
* **Headers**: `Authorization` : `Bearer {access_token}`
* **Input Query**:

 Query Name | Sample Data |
| -------- | -------- |
| `page`: `number` | `1` |
| `limit`: `number` | `10` |
| `bookingStatus`: `number`| `requested`, `scheduled`,`activated`, `cancelled`, `completed`,`expired` |
|`pickupDate`:`date`|`2022-01-10`|
|`pickupTime`:`object`|`{ "start": "12:00", "end": "06:00" }`|
|`minPrice`:`number`|`1`|
|`maxPrice`:`number`|`1`|
|`truckQuantity`:`number`|`1`|
* **Request Body**:
`no request body`
* **Response**:

```status_code: 201```
```json=
{
	"success": true,
	"message": "Booking get successfully.",
	"count": 41,
	"data": [
		{
			"id": 23,
			"truckQuantity": 15,
			"truckType": {
				"id": 38,
				"truckTypeEn": "20FT Open Truck",
				"truckTypeBn": "২০ ফুট খোলা ট্রাক",
				"status": "active"
			},
			"truckCategory": {
				"id": 3,
				"truckCategoryEn": "Trailer",
				"truckCategoryBn": "ট্রেইলার",
				"status": "active"
			},
			"bookingItems": [
				{
					"itemId": "6",
					"name": "cement",
					"label": {
						"en": "Cement",
						"bn": "সিমেন্ট"
					},
					"measurements": [
						{
							"name": "quantity",
							"unit": {
								"name": "bags",
								"label": {
									"en": "Bags",
									"bn": "ব্যাগ"
								}
							},
							"value": 50
						}
					]
				}
			],
			"fromLocation": {
				"address": "Mongla Port, Mongla, Bangladesh",
				"latitude": 22.49046969999999,
				"longitude": 89.59160519999999,
				"addressLocale": {
					"bn": "Mongla Port",
					"en": "Mongla Por"
				}
			},
			"toLocation": {
				"address": "Jessore Post Office",
				"latitude": 23.163687,
				"longitude": 89.208563,
				"addressLocale": {
					"bn": "যশর পোস্ট অফিস, যশর সদর, যশর সদর, যশর",
					"en": "Jessore Post Office, Jessore Sadar, Jessore"
				}
			},
			"fromDistrict": {
				"address": "Bagerhat, Khulna, Bangladesh",
				"latitude": 22.651568,
				"longitude": 89.785938,
				"addressLocale": {
					"bn": "বাগেরহাট",
					"en": "Bagerhat"
				}
			},
			"toDistrict": {
				"address": "Jessore, Khulna, Bangladesh",
				"latitude": 23.16643,
				"longitude": 89.2081126,
				"addressLocale": {
					"bn": "যশোর",
					"en": "Jessore"
				}
			},
			"additionalNotes": "",
			"createdAt": "2022-01-10T04:18:11.296Z",
			"stoppages": [],
			"minPrice": 1331.333,
			"maxPrice": 13412,
			"loadingAgent": {
				"userId": "01FR1Y19Y34YVCT1TWZCD7TZEY",
				"email": "aeffhhkn@gmail.com",
				"phone": "+8801799999979",
				"fullName": "aa",
				"gender": "male",
				"role": "shipper_agent"
			},
			"unloadingAgent": {
				"userId": "01FR1Y19Y34YVCT1TWZCD7TZEY",
				"email": "aeffhhkn@gmail.com",
				"phone": "+8801799999979",
				"fullName": "aa",
				"gender": "male",
				"role": "shipper_agent"
			},
			"shipper": {
				"userId": "01FQTZS6KFM38XYX6EVXC43HXH",
				"email": "syedmusa00@gmail.comt",
				"phone": "+8801745778892",
				"fullName": "syed musa tazim",
				"gender": "male",
				"role": "shipper"
			},
			"kam": {
				"userId": "01FRMT9G4YA91ZH53E560P2PRH",
				"email": "e255rdch1@gmail.com",
				"phone": "+8801754137298",
				"fullName": "2ty1dch1",
				"gender": "male",
				"role": "kam"
			},
			"bookingStatus": "requested"
		},
		{
			"id": 22,
			"truckQuantity": 15,
			"truckType": {
				"id": 38,
				"truckTypeEn": "20FT Open Truck",
				"truckTypeBn": "২০ ফুট খোলা ট্রাক",
				"status": "active"
			},
			"truckCategory": {
				"id": 3,
				"truckCategoryEn": "Trailer",
				"truckCategoryBn": "ট্রেইলার",
				"status": "active"
			},
			"bookingItems": [
				{
					"itemId": "6",
					"name": "cement",
					"label": {
						"en": "Cement",
						"bn": "সিমেন্ট"
					},
					"measurements": [
						{
							"name": "quantity",
							"unit": {
								"name": "bags",
								"label": {
									"en": "Bags",
									"bn": "ব্যাগ"
								}
							},
							"value": 50
						}
					]
				}
			],
			"fromLocation": {
				"address": "Mongla Port, Mongla, Bangladesh",
				"latitude": 22.49046969999999,
				"longitude": 89.59160519999999,
				"addressLocale": {
					"bn": "Mongla Port",
					"en": "Mongla Por"
				}
			},
			"toLocation": {
				"address": "Jessore Post Office",
				"latitude": 23.163687,
				"longitude": 89.208563,
				"addressLocale": {
					"bn": "যশর পোস্ট অফিস, যশর সদর, যশর সদর, যশর",
					"en": "Jessore Post Office, Jessore Sadar, Jessore"
				}
			},
			"fromDistrict": {
				"address": "Bagerhat, Khulna, Bangladesh",
				"latitude": 22.651568,
				"longitude": 89.785938,
				"addressLocale": {
					"bn": "বাগেরহাট",
					"en": "Bagerhat"
				}
			},
			"toDistrict": {
				"address": "Jessore, Khulna, Bangladesh",
				"latitude": 23.16643,
				"longitude": 89.2081126,
				"addressLocale": {
					"bn": "যশোর",
					"en": "Jessore"
				}
			},
			"additionalNotes": "",
			"createdAt": "2022-01-09T07:22:03.982Z",
			"stoppages": [],
			"minPrice": 1331.333,
			"maxPrice": 13412,
			"loadingAgent": {
				"userId": "01FR1Y19Y34YVCT1TWZCD7TZEY",
				"email": "aeffhhkn@gmail.com",
				"phone": "+8801799999979",
				"fullName": "aa",
				"gender": "male",
				"role": "shipper_agent"
			},
			"unloadingAgent": {
				"userId": "01FR1Y19Y34YVCT1TWZCD7TZEY",
				"email": "aeffhhkn@gmail.com",
				"phone": "+8801799999979",
				"fullName": "aa",
				"gender": "male",
				"role": "shipper_agent"
			},
			"shipper": {
				"userId": "01FQTZS6KFM38XYX6EVXC43HXH",
				"email": "syedmusa00@gmail.comt",
				"phone": "+8801745778892",
				"fullName": "syed musa tazim",
				"gender": "male",
				"role": "shipper"
			},
			"kam": {
				"userId": "01FRMT9G4YA91ZH53E560P2PRH",
				"email": "e255rdch1@gmail.com",
				"phone": "+8801754137298",
				"fullName": "2ty1dch1",
				"gender": "male",
				"role": "kam"
			},
			"bookingStatus": "requested"
		}
	]
}
```
### 1.13 Booking bidding details for shipper
* **Description:** Shipper gets single booking trip list for his booking after approve by admin. 
* **Permission role**: shipper
* **Method**:`GET`
* **Api path**:`/shipper/booking/{bookingId}/biddings`
* **Headers**: `Authorization` : `Bearer {access_token}`
* **Request Body**:
`no request body`
* **Response**:
```status_code: 200```
```json=
{
	"success": true,
	"message": "Booking biddings get successfully.",
	"data": {
		"id": 7,
		"truckQuantity": 15,
		"truckType": {
			"id": 38,
			"truckTypeEn": "20FT Open Truck",
			"truckTypeBn": "২০ ফুট খোলা ট্রাক",
			"status": "active"
		},
		"truckCategory": {
			"id": 3,
			"truckCategoryEn": "Trailer",
			"truckCategoryBn": "ট্রেইলার",
			"status": "active"
		},
		"fromLocation": {
			"address": "Mongla Port, Mongla, Bangladesh",
			"latitude": 22.49046969999999,
			"longitude": 89.59160519999999,
			"addressLocale": {
				"bn": "Mongla Port",
				"en": "Mongla Por"
			}
		},
		"toLocation": {
			"address": "Jessore Post Office",
			"latitude": 23.163687,
			"longitude": 89.208563,
			"addressLocale": {
				"bn": "যশর পোস্ট অফিস, যশর সদর, যশর সদর, যশর",
				"en": "Jessore Post Office, Jessore Sadar, Jessore"
			}
		},
		"fromDistrict": {
			"address": "Bagerhat, Khulna, Bangladesh",
			"latitude": 22.651568,
			"longitude": 89.785938,
			"addressLocale": {
				"bn": "বাগেরহাট",
				"en": "Bagerhat"
			}
		},
		"toDistrict": {
			"address": "Jessore, Khulna, Bangladesh",
			"latitude": 23.16643,
			"longitude": 89.2081126,
			"addressLocale": {
				"bn": "যশোর",
				"en": "Jessore"
			}
		},
		"additionalNotes": "",
		"createdAt": "2022-01-07T05:24:57.979Z",
		"stoppages": [],
		"minPrice": 1331.333,
		"maxPrice": 13412,
		"loadingAgent": {},
		"unloadingAgent": {},
		"shipper": {
			"userId": "01FQTZS6KFM38XYX6EVXC43HXH",
			"email": "syedmusa00@gmail.comt",
			"phone": "+8801745778892",
			"fullName": "syed musa tazim",
			"gender": "male",
			"role": "shipper"
		},
		"kam": {
			"userId": "01FRMT9G4YA91ZH53E560P2PRH",
			"email": "e255rdch1@gmail.com",
			"phone": "+8801754137298",
			"fullName": "2ty1dch1",
			"gender": "male",
			"role": "kam"
		},
		"bookingStatus": "requested",
		"biddings": []
	}
}
```
### 1.14 Booking details for a single booking from shipper
* **Description**: Shipper gets a specific booking details from his own booking using bookingId. 
* **Permission role**: shipper
* **Method**:`GET`
* **Api path**:`/shipper/booking/{bookingId}`
* **Headers**: `Authorization` : `Bearer {access_token}`
* **Request Body**:
`no request body`
* **Response**:
```status_code: 201```
```json=
{
	"success": true,
	"message": "Booking gets successfully.",
	"data": {
		"id": 63,
		"truckQuantity": 15,
		"truckType": {
			"id": 38,
			"truckTypeEn": "20FT Open Truck",
			"truckTypeBn": "২০ ফুট খোলা ট্রাক",		"status": "active"
		},
		"truckCategory": {
			"id": 3,
			"truckCategoryEn": "Trailer",
			"truckCategoryBn": "ট্রেইলার",
			"status": "active"
		},
		"fromLocation": {
			"address": "Mongla Port, Mongla, Bangladesh",
			"latitude": 22.49046969999999,
			"longitude": 89.59160519999999,
			"addressLocale": {
				"bn": "Mongla Port",
				"en": "Mongla Por"
			}
		},
		"toLocation": {
			"address": "Jessore Post Office",
			"latitude": 23.163687,
			"longitude": 89.208563,
			"addressLocale": {
				"bn": "যশর পোস্ট অফিস, যশর সদর, যশর সদর, যশর",
				"en": "Jessore Post Office, Jessore Sadar, Jessore"
			}
		},
		"fromDistrict": {
			"address": "Bagerhat, Khulna, Bangladesh",
			"latitude": 22.651568,
			"longitude": 89.785938,
			"addressLocale": {
				"bn": "বাগেরহাট",
				"en": "Bagerhat"
			}
		},
		"toDistrict": {
			"address": "Jessore, Khulna, Bangladesh",
			"latitude": 23.16643,
			"longitude": 89.2081126,
			"addressLocale": {
				"bn": "যশোর",
				"en": "Jessore"
			}
		},
		"additionalNotes": "",
		"createdAt": "2022-01-10T18:01:09.776Z",
		"stoppages": [],
		"minPrice": 1331.333,
		"maxPrice": 13412,
		"loadingAgent": {
			"userId": "01FR1Y19Y34YVCT1TWZCD7TZEY",
			"email": "aeffhhkn@gmail.com",
			"phone": "+8801799999979",
			"fullName": "aa",
			"gender": "male",
			"role": "shipper"
		},
		"unloadingAgent": {
			"userId": "01FR1Y19Y34YVCT1TWZCD7TZEY",
			"email": "aeffhhkn@gmail.com",
			"phone": "+8801799999979",
			"fullName": "aa",
			"gender": "male",
			"role": "shipper"
		},
		"shipper": {
			"userId": "01FQTZS6KFM38XYX6EVXC43HXH",
			"email": "syedmusa00@gmail.comt",
			"phone": "+8801745778892",
			"fullName": "syed musa tazim",
			"gender": "male",
			"role": "shipper"
		},
		"kam": {
			"userId": "01FRMT9G4YA91ZH53E560P2PRH",
			"email": "e255rdch1@gmail.com",
			"phone": "+8801754137298",
			"fullName": "2ty1dch1",
			"gender": "male",
			"role": "kam"
		},
		"bookingStatus": "requested",
		"fareHistory": {
			"id": 25,
			"createdAt": "2022-01-13T06:46:37.699Z",
			"baseAmount": 5000,
			"fareAmount": 5650,
			"marginPercent": 8,
			"marginAmount": 400,
			"vatPercent": 4,
			"vatAmount": 200,
			"aitPercent": 1,
			"aitAmount": 50,
			"fareHistoryStatus": "pending"
		}
	}
}
```
### 1.15 update a booking from shipper
* **Description**: Shipper updates his following details from a booking. 
* **Permission role**: shipper
* **Method**:`PUT`
* **Api path**:`/shipper/booking/{bookingId}`
* **Headers**: `Authorization` : `Bearer {access_token}`
* **Input Field**:

| Field Name | Sample Data | Required|
| -------- | -------- |--------|
| `bookingItems`: `object[]`| `[{ "itemId": "JSHJSNB362SDJKSD", "name": "cement+", "label": { "en": "Cement", "bn": "সিমেন্ট"}, "category": "construction-materials", "measurements" : [ { "name": "quantity", "unit": {"name": "bags", "label": {"en": "Bags", "bn": "ব্যাগ"}}, "value": "50" }, { "name": "wieight", "unit": {"name": "kg", "label": {"en": "Kg", "bn": "কেজি"}}, "value": "2500.0" }]` |`true`| 
* **Request Body**:
```json= 
{
"bookingItems": [
    {
        "itemId": "JSHJSNB362SDJKSD",
        "name": "cement+",
        "label": {
            "en": "Cement",
            "bn": "সিমেন্ট"
        },
        "category": "construction-materials",
        "measurements": [
            {
                "name": "quantity",
                "unit": {
                    "name": "bags",
                    "label": {
                        "en": "Bags",
                        "bn": "ব্যাগ"
                    }
                },
                "value": "50"
            },
            {
                "name": "wieight",
                "unit": {
                    "name": "kg",
                    "label": {
                        "en": "Kg",
                        "bn": "কেজি"
                    }
                },
                "value": "2500.0"
            }
        ]
    }
]
}
```
* **Response**:
```status_code: 200```
```json=
{
	"success": true,
	"message": "Shipping item succesafully updated.",
	"count": 41,
	"data": [
		{
			"id": 23,
			"truckQuantity": 15,
			"truckType": {
				"id": 38,
				"truckTypeEn": "20FT Open Truck",
				"truckTypeBn": "২০ ফুট খোলা ট্রাক",
				"status": "active"
			},
			"truckCategory": {
				"id": 3,
				"truckCategoryEn": "Trailer",
				"truckCategoryBn": "ট্রেইলার",
				"status": "active"
			},
			"bookingItems": [
				{
					"itemId": "6",
					"name": "cement",
					"label": {
						"en": "Cement",
						"bn": "সিমেন্ট"
					},
					"measurements": [
						{
							"name": "quantity",
							"unit": {
								"name": "bags",
								"label": {
									"en": "Bags",
									"bn": "ব্যাগ"
								}
							},
							"value": 50
						}
					]
				}
			],
			"fromLocation": {
				"address": "Mongla Port, Mongla, Bangladesh",
				"latitude": 22.49046969999999,
				"longitude": 89.59160519999999,
				"addressLocale": {
					"bn": "Mongla Port",
					"en": "Mongla Por"
				}
			},
			"toLocation": {
				"address": "Jessore Post Office",
				"latitude": 23.163687,
				"longitude": 89.208563,
				"addressLocale": {
					"bn": "যশর পোস্ট অফিস, যশর সদর, যশর সদর, যশর",
					"en": "Jessore Post Office, Jessore Sadar, Jessore"
				}
			},
			"fromDistrict": {
				"address": "Bagerhat, Khulna, Bangladesh",
				"latitude": 22.651568,
				"longitude": 89.785938,
				"addressLocale": {
					"bn": "বাগেরহাট",
					"en": "Bagerhat"
				}
			},
			"toDistrict": {
				"address": "Jessore, Khulna, Bangladesh",
				"latitude": 23.16643,
				"longitude": 89.2081126,
				"addressLocale": {
					"bn": "যশোর",
					"en": "Jessore"
				}
			},
			"additionalNotes": "",
			"createdAt": "2022-01-10T04:18:11.296Z",
			"stoppages": [],
			"minPrice": 1331.333,
			"maxPrice": 13412,
			"loadingAgent": {
				"userId": "01FR1Y19Y34YVCT1TWZCD7TZEY",
				"email": "aeffhhkn@gmail.com",
				"phone": "+8801799999979",
				"fullName": "aa",
				"gender": "male",
				"role": "shipper_agent"
			},
			"unloadingAgent": {
				"userId": "01FR1Y19Y34YVCT1TWZCD7TZEY",
				"email": "aeffhhkn@gmail.com",
				"phone": "+8801799999979",
				"fullName": "aa",
				"gender": "male",
				"role": "shipper_agent"
			},
			"shipper": {
				"userId": "01FQTZS6KFM38XYX6EVXC43HXH",
				"email": "syedmusa00@gmail.comt",
				"phone": "+8801745778892",
				"fullName": "syed musa tazim",
				"gender": "male",
				"role": "shipper"
			},
			"kam": {
				"userId": "01FRMT9G4YA91ZH53E560P2PRH",
				"email": "e255rdch1@gmail.com",
				"phone": "+8801754137298",
				"fullName": "2ty1dch1",
				"gender": "male",
				"role": "kam"
			},
			"bookingStatus": "requested"
		},
		{
			"id": 22,
			"truckQuantity": 15,
			"truckType": {
				"id": 38,
				"truckTypeEn": "20FT Open Truck",
				"truckTypeBn": "২০ ফুট খোলা ট্রাক",
				"status": "active"
			},
			"truckCategory": {
				"id": 3,
				"truckCategoryEn": "Trailer",
				"truckCategoryBn": "ট্রেইলার",
				"status": "active"
			},
			"bookingItems": [
				{
					"itemId": "JSHJSNB362SDJKSD",
					"name": "cement+",
					"label": {
						"en": "Cement",
						"bn": "সিমেন্ট"
					},
					"category": "construction-materials",
					"measurements": [
						{
							"name": "quantity",
							"unit": {
								"name": "bags",
								"label": {
									"en": "Bags",
									"bn": "ব্যাগ"
								}
							},
							"value": "50"
						},
						{
							"name": "wieight",
							"unit": {
								"name": "kg",
								"label": {
									"en": "Kg",
									"bn": "কেজি"
								}
							},
							"value": "2500.0"
						}
					]
				}
			],
			"fromLocation": {
				"address": "Mongla Port, Mongla, Bangladesh",
				"latitude": 22.49046969999999,
				"longitude": 89.59160519999999,
				"addressLocale": {
					"bn": "Mongla Port",
					"en": "Mongla Por"
				}
			},
			"toLocation": {
				"address": "Jessore Post Office",
				"latitude": 23.163687,
				"longitude": 89.208563,
				"addressLocale": {
					"bn": "যশর পোস্ট অফিস, যশর সদর, যশর সদর, যশর",
					"en": "Jessore Post Office, Jessore Sadar, Jessore"
				}
			},
			"fromDistrict": {
				"address": "Bagerhat, Khulna, Bangladesh",
				"latitude": 22.651568,
				"longitude": 89.785938,
				"addressLocale": {
					"bn": "বাগেরহাট",
					"en": "Bagerhat"
				}
			},
			"toDistrict": {
				"address": "Jessore, Khulna, Bangladesh",
				"latitude": 23.16643,
				"longitude": 89.2081126,
				"addressLocale": {
					"bn": "যশোর",
					"en": "Jessore"
				}
			},
			"additionalNotes": "",
			"createdAt": "2022-01-09T07:22:03.982Z",
			"stoppages": [],
			"minPrice": 1331.333,
			"maxPrice": 13412,
			"loadingAgent": {
				"userId": "01FR1Y19Y34YVCT1TWZCD7TZEY",
				"email": "aeffhhkn@gmail.com",
				"phone": "+8801799999979",
				"fullName": "aa",
				"gender": "male",
				"role": "shipper_agent"
			},
			"unloadingAgent": {
				"userId": "01FR1Y19Y34YVCT1TWZCD7TZEY",
				"email": "aeffhhkn@gmail.com",
				"phone": "+8801799999979",
				"fullName": "aa",
				"gender": "male",
				"role": "shipper_agent"
			},
			"shipper": {
				"userId": "01FQTZS6KFM38XYX6EVXC43HXH",
				"email": "syedmusa00@gmail.comt",
				"phone": "+8801745778892",
				"fullName": "syed musa tazim",
				"gender": "male",
				"role": "shipper"
			},
			"kam": {
				"userId": "01FRMT9G4YA91ZH53E560P2PRH",
				"email": "e255rdch1@gmail.com",
				"phone": "+8801754137298",
				"fullName": "2ty1dch1",
				"gender": "male",
				"role": "kam"
			},
			"bookingStatus": "requested"
		}
	]
}
```
### 1.16 Booking details for a single booking from shipper
* **Description**: Shipper gets a specific booking details from a company which is he booked. 
* **Permission role**: shipper
* **Method**:`GET`
* **Api path**:`/shipper/booking/company/{companyId}`
* **Headers**: `Authorization` : `Bearer {access_token}`
* **Request Body**:
`no request body`
* **Response**:
```status_code: 200```
```json=
{
	"success": true,
	"message": "Booking gets successfully.",
	"data": [
		{
			"id": 4,
			"truckQuantity": 15,
			"truckType": {
				"id": 38,
				"truckTypeEn": "20FT Open Truck",
				"truckTypeBn": "২০ ফুট খোলা ট্রাক",
				"status": "active"
			},
			"truckCategory": {
				"id": 3,
				"truckCategoryEn": "Trailer",
				"truckCategoryBn": "ট্রেইলার",
				"status": "active"
			},
			"fromLocation": {
				"address": "Mongla Port, Mongla, Bangladesh",
				"latitude": 22.49046969999999,
				"longitude": 89.59160519999999,
				"addressLocale": {
					"bn": "Mongla Port",
					"en": "Mongla Por"
				}
			},
			"toLocation": {
				"address": "Jessore Post Office",
				"latitude": 23.163687,
				"longitude": 89.208563,
				"addressLocale": {
					"bn": "যশর পোস্ট অফিস, যশর সদর, যশর সদর, যশর",
					"en": "Jessore Post Office, Jessore Sadar, Jessore"
				}
			},
			"fromDistrict": {
				"address": "Bagerhat, Khulna, Bangladesh",
				"latitude": 22.651568,
				"longitude": 89.785938,
				"addressLocale": {
					"bn": "বাগেরহাট",
					"en": "Bagerhat"
				}
			},
			"toDistrict": {
				"address": "Jessore, Khulna, Bangladesh",
				"latitude": 23.16643,
				"longitude": 89.2081126,
				"addressLocale": {
					"bn": "যশোর",
					"en": "Jessore"
				}
			},
			"additionalNotes": "",
			"createdAt": "2022-01-07T05:20:41.655Z",
			"stoppages": [],
			"minPrice": 1331.333,
			"maxPrice": 13412,
			"loadingAgent": {},
			"unloadingAgent": {},
			"shipper": {
				"userId": "01FQTZS6KFM38XYX6EVXC43HXH",
				"email": "syedmusa00@gmail.comt",
				"phone": "+8801745778892",
				"fullName": "syed musa tazim",
				"gender": "male",
				"role": "shipper"
			},
			"kam": {
				"userId": "01FRMT9G4YA91ZH53E560P2PRH",
				"email": "e255rdch1@gmail.com",
				"phone": "+8801754137298",
				"fullName": "2ty1dch1",
				"gender": "male",
				"role": "kam"
			},
			"bookingStatus": "requested"
		}
	]
}
```
### 1.17 Single booking trip list for shipper
* **Description:** Shipper gets bidding result for his booking. 
* **Permission role**: shipper
* **Method**:`GET`
* **Api path**: `/shipper/booking/{bookingId}/trips`
* **Headers**: `Authorization` : `Bearer {access_token}`
* **Input Query**:

 Query Name | Sample Data |
| -------- | -------- |
| `page`: `number` | `1` |
| `limit`: `number` | `10` |
| `bookingStatus`: `number`| `requested`, `scheduled`,`activated`, `cancelled`, `completed`,`expired` |
* **Request Body**:
`no request body`
* **Response**:
```status_code: 201```
```json=
{
	"success": true,
	"message": "Booking trip list get successfully.",
	"data": {
		"id": 131,
		"truckQuantity": 2,
		"truckType": {
			"id": 47,
			"truckTypeEn": "Flat Bed Trailer: 5XL 40FT",
			"truckTypeBn": "ফ্ল্যাট বেড ট্রেলার: ৫ এক্সেল ৪০ ফুট",
			"status": "active"
		},
		"truckCategory": {
			"id": 4,
			"truckCategoryEn": "Covered Van",
			"truckCategoryBn": "কাভার্ড ভ্যান",
			"status": "active"
		},
		"pickupDate": "2022-01-10",
		"pickupTime": {
			"end": "11:00",
			"start": "06:00"
		},
		"fromLocation": {
			"address": "Dhaka Medical College Hospital",
			"latitude": 23.7260553,
			"longitude": 90.3975292,
			"addressLocale": {
				"bn": "Dhaka Medical College Hospital",
				"en": "Dhaka Medical College Hospital"
			}
		},
		"toLocation": {
			"address": "Khulna Railway Station",
			"latitude": 22.8202771,
			"longitude": 89.5579797,
			"addressLocale": {
				"bn": "Khulna Railway Station",
				"en": "Khulna Railway Station"
			}
		},
		"fromDistrict": {
			"address": "Dhaka, Dhaka, Bangladesh",
			"latitude": 23.7115253,
			"longitude": 90.4111451,
			"addressLocale": {
				"bn": "ঢাকা",
				"en": "Dhaka"
			}
		},
		"toDistrict": {
			"address": "Khulna, Khulna, Bangladesh",
			"latitude": 22.815774,
			"longitude": 89.568679,
			"addressLocale": {
				"bn": "খুলনা",
				"en": "Khulna"
			}
		},
		"additionalNotes": "",
		"createdAt": "2022-01-17T11:38:04.637Z",
		"stoppages": [],
		"minPrice": 2300,
		"maxPrice": 12000,
		"progressPercent": 40,
		"advancedPayment": 0,
		"loadingAgent": {
			"userId": "01FSK5SQQ9E56W9SDPC28KPT7M",
			"email": "wh1hknn@gmail.com",
			"phone": "+8801867889981",
			"fullName": "aa",
			"gender": "male",
			"role": "shipper_agent"
		},
		"unloadingAgent": {
			"userId": "01FSK61NZ150B5PCQTA6FXDNCG",
			"email": "wh1hknan@gmail.com",
			"phone": "+8801867889081",
			"fullName": "aa",
			"gender": "male",
			"role": "shipper_agent"
		},
		"stage": "select_vendor",
		"shipper": {
			"userId": "01FQTZS6KFM38XYX6EVXC43HXH",
			"email": "syedmusa00@gmail.comt",
			"phone": "+8801745778892",
			"fullName": "syed musa tazim",
			"gender": "male",
			"role": "shipper"
		},
		"kam": {
			"userId": "01FRMT9G4YA91ZH53E560P2PRH",
			"email": "e255rdch1@gmail.com",
			"phone": "+8801754137298",
			"fullName": "2ty1dch1",
			"gender": "male",
			"role": "kam"
		},
		"bookingStatus": "scheduled",
		"trips": [
			{
				"id": 26,
				"fareAmount": 10043,
				"demurrage": 0,
				"totalAmount": 10043,
				"startedAt": null,
				"truck": {
					"id": 51,
					"truckType": {
						"id": 47,
						"status": "active",
						"truckTypeBn": "ফ্ল্যাট বেড ট্রেলার: ৫ এক্সেল ৪০ ফুট",
						"truckTypeEn": "Flat Bed Trailer: 5XL 40FT"
					},
					"truckModelNo": null,
					"truckCategory": {
						"id": 4,
						"status": "active",
						"truckCategoryBn": "কাভার্ড ভ্যান",
						"truckCategoryEn": "Covered Van"
					},
					"licensePlateNoBn": "ঢাকা মেট্রো অ ১৭৭৬৬০",
					"licensePlateNoEn": "ঢাকা মেট্রো অ ১৭৭৬৬০",
					"truckAvailability": "available",
					"licensePlateNoTextBn": "ঢাকা মেট্রো - অ - ১৭৭৬৬০",
					"licensePlateNoTextEn": "Dhaka Metro - AW - 177660"
				},
				"driver": {
					"id": 3,
					"phone": "+8801631699718",
					"fullName": "Mahbub alam ",
					"createdAt": "2021-12-27T07:20:12.739Z",
					"driverAvailability": "available"
				},
				"endedAt": null,
				"status": "active",
				"tripStatus": "activated"
			},
			{
				"id": 25,
				"fareAmount": 10043,
				"demurrage": 0,
				"totalAmount": 10043,
				"startedAt": null,
				"truck": {
					"id": 50,
					"truckType": {
						"id": 47,
						"status": "active",
						"truckTypeBn": "ফ্ল্যাট বেড ট্রেলার: ৫ এক্সেল ৪০ ফুট",
						"truckTypeEn": "Flat Bed Trailer: 5XL 40FT"
					},
					"truckModelNo": null,
					"truckCategory": {
						"id": 4,
						"status": "active",
						"truckCategoryBn": "কাভার্ড ভ্যান",
						"truckCategoryEn": "Covered Van"
					},
					"licensePlateNoBn": "ঢাকা মেট্রো অ ১৯৭৬৬০",
					"licensePlateNoEn": "ঢাকা মেট্রো অ ১৯৭৬৬০",
					"truckAvailability": "available",
					"licensePlateNoTextBn": "ঢাকা মেট্রো - অ - ১৯৭৬৬০",
					"licensePlateNoTextEn": "Dhaka Metro - AW - 197660"
				},
				"driver": {
					"id": 2,
					"phone": "+8801631699719",
					"fullName": "Mahbub alam ",
					"createdAt": "2021-12-27T07:08:21.681Z",
					"driverAvailability": "available"
				},
				"endedAt": null,
				"status": "active",
				"tripStatus": "activated"
			}
		]
	}
}
```
### 1.18 A single trip details for booking from shipper
* **Description**: Shipper gets a specific trip details from his own booking. 
* **Permission role**: shipper
* **Method**:`GET`
* **Api path**: `/shipper/booking/{bookingId}/trips/{tripId}`
* **Headers**: `Authorization` : `Bearer {access_token}`
* **Input Query**:

| Query Name | Sample Data |
| -------- | -------- |
| `page`: `number` | `1` |
| `limit`: `number` | `10` |
| `bookingStatus`: `number`| `requested`, `scheduled`,`activated`, `cancelled`, `completed`,`expired` |
* **Request Body**:
`no request body`
* **Response**:
```status_code: 201```
```json=
{
	"success": true,
	"message": "Booking trip details get successfully.",
	"data": {
		"id": 131,
		"truckQuantity": 2,
		"truckType": {
			"id": 47,
			"truckTypeEn": "Flat Bed Trailer: 5XL 40FT",
			"truckTypeBn": "ফ্ল্যাট বেড ট্রেলার: ৫ এক্সেল ৪০ ফুট",
			"status": "active"
		},
		"truckCategory": {
			"id": 4,
			"truckCategoryEn": "Covered Van",
			"truckCategoryBn": "কাভার্ড ভ্যান",
			"status": "active"
		},
		"pickupDate": "2022-01-10",
		"pickupTime": {
			"end": "11:00",
			"start": "06:00"
		},
		"fromLocation": {
			"address": "Dhaka Medical College Hospital",
			"latitude": 23.7260553,
			"longitude": 90.3975292,
			"addressLocale": {
				"bn": "Dhaka Medical College Hospital",
				"en": "Dhaka Medical College Hospital"
			}
		},
		"toLocation": {
			"address": "Khulna Railway Station",
			"latitude": 22.8202771,
			"longitude": 89.5579797,
			"addressLocale": {
				"bn": "Khulna Railway Station",
				"en": "Khulna Railway Station"
			}
		},
		"fromDistrict": {
			"address": "Dhaka, Dhaka, Bangladesh",
			"latitude": 23.7115253,
			"longitude": 90.4111451,
			"addressLocale": {
				"bn": "ঢাকা",
				"en": "Dhaka"
			}
		},
		"toDistrict": {
			"address": "Khulna, Khulna, Bangladesh",
			"latitude": 22.815774,
			"longitude": 89.568679,
			"addressLocale": {
				"bn": "খুলনা",
				"en": "Khulna"
			}
		},
		"additionalNotes": "",
		"createdAt": "2022-01-17T11:38:04.637Z",
		"stoppages": [],
		"minPrice": 2300,
		"maxPrice": 12000,
		"progressPercent": 40,
		"advancedPayment": 0,
		"loadingAgent": {
			"userId": "01FSK5SQQ9E56W9SDPC28KPT7M",
			"email": "wh1hknn@gmail.com",
			"phone": "+8801867889981",
			"fullName": "aa",
			"gender": "male",
			"role": "shipper_agent"
		},
		"unloadingAgent": {
			"userId": "01FSK61NZ150B5PCQTA6FXDNCG",
			"email": "wh1hknan@gmail.com",
			"phone": "+8801867889081",
			"fullName": "aa",
			"gender": "male",
			"role": "shipper_agent"
		},
		"stage": "select_vendor",
		"shipper": {
			"userId": "01FQTZS6KFM38XYX6EVXC43HXH",
			"email": "syedmusa00@gmail.comt",
			"phone": "+8801745778892",
			"fullName": "syed musa tazim",
			"gender": "male",
			"role": "shipper"
		},
		"kam": {
			"userId": "01FRMT9G4YA91ZH53E560P2PRH",
			"email": "e255rdch1@gmail.com",
			"phone": "+8801754137298",
			"fullName": "2ty1dch1",
			"gender": "male",
			"role": "kam"
		},
		"bookingStatus": "scheduled",
		"trips": [
			{
				"id": 25,
				"fareAmount": 10043,
				"demurrage": 0,
				"totalAmount": 10043,
				"startedAt": null,
				"truck": {
					"id": 50,
					"truckType": {
						"id": 47,
						"status": "active",
						"truckTypeBn": "ফ্ল্যাট বেড ট্রেলার: ৫ এক্সেল ৪০ ফুট",
						"truckTypeEn": "Flat Bed Trailer: 5XL 40FT"
					},
					"truckModelNo": null,
					"truckCategory": {
						"id": 4,
						"status": "active",
						"truckCategoryBn": "কাভার্ড ভ্যান",
						"truckCategoryEn": "Covered Van"
					},
					"licensePlateNoBn": "ঢাকা মেট্রো অ ১৯৭৬৬০",
					"licensePlateNoEn": "ঢাকা মেট্রো অ ১৯৭৬৬০",
					"truckAvailability": "available",
					"licensePlateNoTextBn": "ঢাকা মেট্রো - অ - ১৯৭৬৬০",
					"licensePlateNoTextEn": "Dhaka Metro - AW - 197660"
				},
				"driver": {
					"id": 2,
					"phone": "+8801631699719",
					"fullName": "Mahbub alam ",
					"createdAt": "2021-12-27T07:08:21.681Z",
					"driverAvailability": "available"
				},
				"endedAt": null,
				"status": "active",
				"tripStatus": "activated"
			}
		]
	}
}
```
### 1.19 Booking cancel from shipper
* **Description**: Shipper can cancel his booking 
* **Permission role**: shipper
* **Method**:`GET`
* **Api path**:`/shipper/booking/{bookingId}/cancel`
* **Headers**: `Authorization` : `Bearer {access_token}`
* **Request Body**:
`no request body`
* **Response**:
```status_code: 200```
```json=
{
	"success": true,
	"message": "Booking cancellation successfully.",
	"data": {
		"id": 9,
		"truckQuantity": 15,
		"truckType": {
			"id": 38,
			"truckTypeEn": "20FT Open Truck",
			"truckTypeBn": "২০ ফুট খোলা ট্রাক",
			"status": "active"
		},
		"truckCategory": {
			"id": 3,
			"truckCategoryEn": "Trailer",
			"truckCategoryBn": "ট্রেইলার",
			"status": "active"
		},
		"fromLocation": {
			"address": "Mongla Port, Mongla, Bangladesh",
			"latitude": 22.49046969999999,
			"longitude": 89.59160519999999,
			"addressLocale": {
				"bn": "Mongla Port",
				"en": "Mongla Por"
			}
		},
		"toLocation": {
			"address": "Jessore Post Office",
			"latitude": 23.163687,
			"longitude": 89.208563,
			"addressLocale": {
				"bn": "যশর পোস্ট অফিস, যশর সদর, যশর সদর, যশর",
				"en": "Jessore Post Office, Jessore Sadar, Jessore"
			}
		},
		"fromDistrict": {
			"address": "Bagerhat, Khulna, Bangladesh",
			"latitude": 22.651568,
			"longitude": 89.785938,
			"addressLocale": {
				"bn": "বাগেরহাট",
				"en": "Bagerhat"
			}
		},
		"toDistrict": {
			"address": "Jessore, Khulna, Bangladesh",
			"latitude": 23.16643,
			"longitude": 89.2081126,
			"addressLocale": {
				"bn": "যশোর",
				"en": "Jessore"
			}
		},
		"additionalNotes": "",
		"createdAt": "2022-01-07T05:27:47.222Z",
		"stoppages": [],
		"minPrice": 1331.333,
		"maxPrice": 13412,
		"loadingAgent": {},
		"unloadingAgent": {},
		"shipper": {
			"userId": "01FQTZS6KFM38XYX6EVXC43HXH",
			"email": "syedmusa00@gmail.comt",
			"phone": "+8801745778892",
			"fullName": "syed musa tazim",
			"gender": "male",
			"role": "shipper"
		},
		"kam": {
			"userId": "01FRMT9G4YA91ZH53E560P2PRH",
			"email": "e255rdch1@gmail.com",
			"phone": "+8801754137298",
			"fullName": "2ty1dch1",
			"gender": "male",
			"role": "kam"
		},
		"bookingStatus": "cancelled"
	}
}
```
### 1.20 Company from shipper
* **Description**: Shipper gets his company summary of booking
* **Permission role**: shipper
* **Method**:`GET`
* **Api path**:`/booking/company-summary`
* **Headers**: `Authorization` : `Bearer {access_token}`
* **Request Body**:
`no request body`
* **Response**:
```status_code: 200```
```json=
{
	"success": true,
	"message": "Booking list get successfully",
	"count": 2,
	"data": [
		{
			"id": 8,
			"lookAtBid": 3,
			"createdAt": "2022-01-15T07:02:55.309Z",
			"company": {
				"id": 1
			},
			"quoteShipper": 0,
			"selectVendor": 0,
			"truckInfo": 1,
			"activeTrip": 0,
			"monthlyTripCompleted": 2
		},
		{
			"id": 9,
			"lookAtBid": 1,
			"createdAt": "2022-01-16T08:22:08.233Z",
			"company": {
				"id": 9
			},
			"quoteShipper": 0,
			"selectVendor": 0,
			"truckInfo": 0,
			"activeTrip": 0,
			"monthlyTripCompleted": 0
		}
	]
}
```
### 1.21 Place a bidding for booking by vendor
* **Description**: Vendor post his bidding for the provided booking.
* **Permission role**: vendor
* **Method**:`POST`
* **Api path**:`/vendor/booking/`
* **Headers**: `Authorization` : `Bearer {access_token}`
* **Input Field**:

| Field Name | Sample Data | Required|
| -------- | -------- |--------|
| `numberOfTrucks`: `number`| `2` |`true`
| `proposedAmountPerTruck`: `number` | `100` |`true`|
| `bookingId`: `number` | `94` |`true`|

* **Request Body**:
```json=
{
	"numberOfTrucks": 2,
	"proposedAmountPerTruck": 100,
	"bookingId": 94
}
```
* **Response**:
```status_code: 201```
```json=
{
	"success": true,
	"message": "Bidding successfully placed.",
	"data": {
		"id": 94,
		"truckQuantity": 4,
		"truckType": {
			"id": 38,
			"status": "active",
			"truckTypeBn": "২০ ফুট খোলা ট্রাক",
			"truckTypeEn": "20FT Open Truck"
		},
		"bookingItems": [
			{
				"itemId": "6",
				"name": "cement",
				"label": {
					"en": "Cement",
					"bn": "সিমেন্ট"
				},
				"measurements": [
					{
						"name": "quantity",
						"unit": {
							"name": "bags",
							"label": {
								"en": "Bags",
								"bn": "ব্যাগ"
							}
						},
						"value": 50
					}
				]
			}
		],
		"fromLocation": {
			"address": "Khulna University",
			"latitude": 22.8022039,
			"longitude": 89.5339231,
			"addressLocale": {
				"bn": "Khulna University",
				"en": "Khulna University"
			}
		},
		"toLocation": {
			"address": "Cox's Bazar Airport.",
			"latitude": 21.4507,
			"longitude": 91.9667,
			"addressLocale": {
				"bn": "Cox's Bazar Airport",
				"en": "Cox's Bazar Airport."
			}
		},
		"fromDistrict": {
			"address": "Khulna, Khulna, Bangladesh",
			"latitude": 22.815774,
			"longitude": 89.568679,
			"addressLocale": {
				"bn": "খুলনা",
				"en": "Khulna"
			}
		},
		"toDistrict": {
			"address": "Cox's Bazar, Chittagong, Bangladesh",
			"latitude": 21.4272,
			"longitude": 92.0058,
			"addressLocale": {
				"bn": "কক্সবাজার",
				"en": "Cox's Bazar"
			}
		},
		"additionalNotes": "",
		"createdAt": "2022-01-13T05:15:42.727Z",
		"stoppages": [
			{
				"address": "Barishal Launch Ghat",
				"latitude": 22.6999559,
				"longitude": 90.3750962,
				"addressLocale": {
					"bn": "Barishal Launch",
					"en": "Barishal Launch Ghat"
				}
			},
			{
				"address": "Feni Central High School (FCHS )",
				"latitude": 23.0063522,
				"longitude": 91.40222,
				"addressLocale": {
					"bn": "Barishal Launch",
					"en": "Feni Central High School (FCHS )"
				}
			}
		],
		"minPrice": 1000,
		"maxPrice": 2005,
		"bookingStatus": "requested",
		"biddings": [
			{
				"id": 9,
				"numberOfTrucks": 2,
				"proposedAmountPerTruck": 100,
				"proposedAmount": 200,
				"confirmed": false,
				"createdAt": "2022-01-13T10:55:33.378Z"
			}
		]
	}
}
```
### 1.22 All booking list for vendor 
* **Description**: Vendor gets here all booking list and status 
* **Permission role**: vendor
* **Method**:`GET`
* **Api path**:`/vendor/booking/`
* **Headers**: `Authorization` : `Bearer {access_token}`
* **Input Query**:

 Query Name | Sample Data |
| -------- | -------- |
| `page`: `number` | `1` |
| `limit`: `number` | `10` |
| `biddingStatus`: `string`| `responded`, `accepted`,`cancelled`|
* **Request Body**:
`no requested body`
* **Response**:
```status_code: 200```
```json=
{
	"success": true,
	"message": "Vendor booking list get successfully.",
	"count": 1,
	"data": [
		{
			"id": 94,
			"truckQuantity": 4,
			"truckType": {
				"id": 38,
				"status": "active",
				"truckTypeBn": "২০ ফুট খোলা ট্রাক",
				"truckTypeEn": "20FT Open Truck"
			},
			"fromLocation": {
				"address": "Khulna University",
				"latitude": 22.8022039,
				"longitude": 89.5339231,
				"addressLocale": {
					"bn": "Khulna University",
					"en": "Khulna University"
				}
			},
			"toLocation": {
				"address": "Cox's Bazar Airport.",
				"latitude": 21.4507,
				"longitude": 91.9667,
				"addressLocale": {
					"bn": "Cox's Bazar Airport",
					"en": "Cox's Bazar Airport."
				}
			},
			"fromDistrict": {
				"address": "Khulna, Khulna, Bangladesh",
				"latitude": 22.815774,
				"longitude": 89.568679,
				"addressLocale": {
					"bn": "খুলনা",
					"en": "Khulna"
				}
			},
			"toDistrict": {
				"address": "Cox's Bazar, Chittagong, Bangladesh",
				"latitude": 21.4272,
				"longitude": 92.0058,
				"addressLocale": {
					"bn": "কক্সবাজার",
					"en": "Cox's Bazar"
				}
			},
			"additionalNotes": "",
			"createdAt": "2022-01-13T05:15:42.727Z",
			"stoppages": [
				{
					"address": "Barishal Launch Ghat",
					"latitude": 22.6999559,
					"longitude": 90.3750962,
					"addressLocale": {
						"bn": "Barishal Launch",
						"en": "Barishal Launch Ghat"
					}
				},
				{
					"address": "Feni Central High School (FCHS )",
					"latitude": 23.0063522,
					"longitude": 91.40222,
					"addressLocale": {
						"bn": "Barishal Launch",
						"en": "Feni Central High School (FCHS )"
					}
				}
			],
			"minPrice": 1000,
			"maxPrice": 2005,
			"bookingStatus": "requested",
			"biddings": [
				{
					"id": 9,
					"numberOfTrucks": 2,
					"proposedAmountPerTruck": 100,
					"proposedAmount": 200,
					"confirmed": false,
					"createdAt": "2022-01-13T10:55:33.378Z"
				}
			]
		}
	]
}
```
### 1.23 Bidding list by vendor including booking details
* **Description**: Vendor gets his biddings list including booking details where he submitted a bid. 
* **Permission role**: vendor
* **Method**:`GET`
* **Api path**:`/vendor/booking/biddings`
* **Headers**: `Authorization` : `Bearer {access_token}`
* **Input Query**:

| Query Name | Sample Data |
| -------- | -------- |
| `page`: `number` | `1` |
| `limit`: `number` | `10` |
| `bookingStatus`: `string`| `requested`, `scheduled`, `activated`, `cancelled`, `completed`, `expired` |
* **Request Body**:
`no requested body `
* **Response**:
```status_code: 200```
```json=
{
	"success": true,
	"message": "Booking biddings get successfully.",
	"count": 1,
	"data": [
		{
			"id": 9,
			"numberOfTrucks": 2,
			"proposedAmountPerTruck": 100,
			"proposedAmount": 200,
			"confirmed": false,
			"createdAt": "2022-01-13T10:55:33.378Z",
			"booking": {
				"id": 94,
				"truckQuantity": 4,
				"truckType": {
					"id": 38,
					"truckTypeEn": "20FT Open Truck",
					"truckTypeBn": "২০ ফুট খোলা ট্রাক",
					"status": "active"
				},
				"truckCategory": {
					"id": 3,
					"truckCategoryEn": "Trailer",
					"truckCategoryBn": "ট্রেইলার",
					"status": "active"
				},
				"fromLocation": {
					"address": "Khulna University",
					"latitude": 22.8022039,
					"longitude": 89.5339231,
					"addressLocale": {
						"bn": "Khulna University",
						"en": "Khulna University"
					}
				},
				"toLocation": {
					"address": "Cox's Bazar Airport.",
					"latitude": 21.4507,
					"longitude": 91.9667,
					"addressLocale": {
						"bn": "Cox's Bazar Airport",
						"en": "Cox's Bazar Airport."
					}
				},
				"fromDistrict": {
					"address": "Khulna, Khulna, Bangladesh",
					"latitude": 22.815774,
					"longitude": 89.568679,
					"addressLocale": {
						"bn": "খুলনা",
						"en": "Khulna"
					}
				},
				"toDistrict": {
					"address": "Cox's Bazar, Chittagong, Bangladesh",
					"latitude": 21.4272,
					"longitude": 92.0058,
					"addressLocale": {
						"bn": "কক্সবাজার",
						"en": "Cox's Bazar"
					}
				},
				"additionalNotes": "",
				"createdAt": "2022-01-13T05:15:42.727Z",
				"stoppages": [
					{
						"address": "Barishal Launch Ghat",
						"latitude": 22.6999559,
						"longitude": 90.3750962,
						"addressLocale": {
							"bn": "Barishal Launch",
							"en": "Barishal Launch Ghat"
						}
					},
					{
						"address": "Feni Central High School (FCHS )",
						"latitude": 23.0063522,
						"longitude": 91.40222,
						"addressLocale": {
							"bn": "Barishal Launch",
							"en": "Feni Central High School (FCHS )"
						}
					}
				],
				"minPrice": 1000,
				"maxPrice": 2005,
				"loadingAgent": {},
				"unloadingAgent": {},
				"shipper": {
					"userId": "01FR4YRSNH7930GJ13A1T34AZ6",
					"email": "4aeffh1hknn@gmail.com",
					"phone": "+8801676554422",
					"fullName": "aa",
					"gender": "male",
					"role": "shipper"
				},
				"kam": {
					"userId": "01FRMT9G4YA91ZH53E560P2PRH",
					"email": "e255rdch1@gmail.com",
					"phone": "+8801754137298",
					"fullName": "2ty1dch1",
					"gender": "male",
					"role": "kam"
				},
				"bookingStatus": "requested"
			}
		}
	]
}
```
### 1.24 Booking details for a specific booking id
* **Description**: Vendor gets a booking details by using a specific `{bookingId}`. He will be notified for any booking only if his truck categories and district preferences are being matched with respected booking. After he is apprised, he gets the details of a booking using `{bookingId}`.  
* **Permission role**: vendor
* **Method**:`GET`
* **Api path**:`/vendor/booking/{bookingId}`
* **Headers**: `Authorization` : `Bearer {access_token}`
* **Request Body**:
`No respose body`
* **Response**:
```status_code: 200```
```json=
{
	"success": true,
	"message": "Booking details gets successfully.",
	"data": {
		"id": 5,
		"truckQuantity": 15,
		"truckType": {
			"id": 38,
			"status": "active",
			"truckTypeBn": "২০ ফুট খোলা ট্রাক",
			"truckTypeEn": "20FT Open Truck"
		},
		"bookingItems": [
			{
				"itemId": "6",
				"name": "cement",
				"label": {
					"en": "Cement",
					"bn": "সিমেন্ট"
				},
				"measurements": [
					{
						"name": "quantity",
						"unit": {
							"name": "bags",
							"label": {
								"en": "Bags",
								"bn": "ব্যাগ"
							}
						},
						"value": 50
					}
				]
			}
		],
		"fromLocation": {
			"address": "Mongla Port, Mongla, Bangladesh",
			"latitude": 22.49046969999999,
			"longitude": 89.59160519999999,
			"addressLocale": {
				"bn": "Mongla Port",
				"en": "Mongla Por"
			}
		},
		"toLocation": {
			"address": "Jessore Post Office",
			"latitude": 23.163687,
			"longitude": 89.208563,
			"addressLocale": {
				"bn": "যশর পোস্ট অফিস, যশর সদর, যশর সদর, যশর",
				"en": "Jessore Post Office, Jessore Sadar, Jessore"
			}
		},
		"fromDistrict": {
			"address": "Bagerhat, Khulna, Bangladesh",
			"latitude": 22.651568,
			"longitude": 89.785938,
			"addressLocale": {
				"bn": "বাগেরহাট",
				"en": "Bagerhat"
			}
		},
		"toDistrict": {
			"address": "Jessore, Khulna, Bangladesh",
			"latitude": 23.16643,
			"longitude": 89.2081126,
			"addressLocale": {
				"bn": "যশোর",
				"en": "Jessore"
			}
		},
		"additionalNotes": "",
		"createdAt": "2022-01-07T05:22:13.793Z",
		"stoppages": [],
		"minPrice": 1331.333,
		"maxPrice": 13412,
		"bookingStatus": "requested",
		"biddings": []
	}
}
```
### 1.25 Trip lists for vendor using specific booking Id.
* **Description**: Vendor gets a single booking trips list using `{bookingId}`.
* **Permission role**: vendor
* **Method**:`GET`
* **Api path**:`/vendor/booking/{bookingId}/trips`
* **Headers**: `Authorization` : `Bearer {access_token}`
* **Request Body**:
`no response body`
* **Response**:
```status_code: 200```
```json=
{
    "success": true,
	"message": "Booking trips get successfully.",
	"data": {
		"id": 11,
		"truckQuantity": 15,
		"remainingTrucks": 15,
		"truckType": {
			"id": 38,
			"status": "active",
			"truckTypeBn": "২০ ফুট খোলা ট্রাক",
			"truckTypeEn": "20FT Open Truck"
		},
		"fromLocation": {
			"address": "Mongla Port, Mongla, Bangladesh",
			"latitude": 22.49046969999999,
			"longitude": 89.59160519999999,
			"addressLocale": {
				"bn": "Mongla Port",
				"en": "Mongla Por"
			}
		},
		"toLocation": {
			"address": "Jessore Post Office",
			"latitude": 23.163687,
			"longitude": 89.208563,
			"addressLocale": {
				"bn": "যশর পোস্ট অফিস, যশর সদর, যশর সদর, যশর",
				"en": "Jessore Post Office, Jessore Sadar, Jessore"
			}
		},
		"fromDistrict": {
			"address": "Bagerhat, Khulna, Bangladesh",
			"latitude": 22.651568,
			"longitude": 89.785938,
			"addressLocale": {
				"bn": "বাগেরহাট",
				"en": "Bagerhat"
			}
		},
		"toDistrict": {
			"address": "Jessore, Khulna, Bangladesh",
			"latitude": 23.16643,
			"longitude": 89.2081126,
			"addressLocale": {
				"bn": "যশোর",
				"en": "Jessore"
			}
		},
		"additionalNotes": "",
		"createdAt": "2022-01-07T05:29:38.660Z",
		"stoppages": [],
		"minPrice": 1331.333,
		"maxPrice": 13412,
		"bookingStatus": "requested",
		"biddings": [],
		"trips": [],
		"company": {
			"id": 1,
			"name": "steeltes",
			"createdAt": "2021-12-29T01:34:45.113Z",
			"companyLat": 120.213123,
			"companyLng": -72.1231,
			"companySuburb": {
				"nameBn": "ঢাকাs",
				"nameEn": "bang"
			},
			"companyAddress": {
				"nameBn": "ঢাsকা",
				"nameEn": "pasdasdassdad,asdasdaasdasadds"
			},
			"companyCountry": {
				"nameBn": "বাংলাদেশ",
				"nameEn": "asdasdasdadasdas"
			},
			"companyDistrict": {
				"nameBn": "ঢাকাs",
				"nameEn": "sssss"
			},
			"companyDivision": {
				"nameBn": "ঢাকা",
				"nameEn": "sdsdadada"
			}
		}
	}
}
```
### 1.26 Total trip list from a vendor
* **Description**: Vendor gets here all the trips list where he win the bidding.
* **Permission role**: vendor
* **Method**:`GET`
* **Api path**:`/vendor/booking/trips`
* **Headers**: `Authorization` : `Bearer {access_token}`
* **Input Query**:

| Query Name | Sample Data |
| -------- | -------- |
| `page`: `number` | `1` |
| `limit`: `number` | `10` |
| `bookingStatus`: `number`| `requested`, `scheduled`,`activated`, `cancelled`, `completed`,`expired` |
* **Request Body**:
`no response body`
* **Request Body**:
```json=
{
    "success": true,
	"message": "Booking trips get successfully.",
	"count": 1,
	"data": [
		"id": 11,
		"truckQuantity": 15,
		"remainingTrucks": 15,
		"truckType": {
			"id": 38,
			"status": "active",
			"truckTypeBn": "২০ ফুট খোলা ট্রাক",
			"truckTypeEn": "20FT Open Truck"
		},
		"fromLocation": {
			"address": "Mongla Port, Mongla, Bangladesh",
			"latitude": 22.49046969999999,
			"longitude": 89.59160519999999,
			"addressLocale": {
				"bn": "Mongla Port",
				"en": "Mongla Por"
			}
		},
		"toLocation": {
			"address": "Jessore Post Office",
			"latitude": 23.163687,
			"longitude": 89.208563,
			"addressLocale": {
				"bn": "যশর পোস্ট অফিস, যশর সদর, যশর সদর, যশর",
				"en": "Jessore Post Office, Jessore Sadar, Jessore"
			}
		},
		"fromDistrict": {
			"address": "Bagerhat, Khulna, Bangladesh",
			"latitude": 22.651568,
			"longitude": 89.785938,
			"addressLocale": {
				"bn": "বাগেরহাট",
				"en": "Bagerhat"
			}
		},
		"toDistrict": {
			"address": "Jessore, Khulna, Bangladesh",
			"latitude": 23.16643,
			"longitude": 89.2081126,
			"addressLocale": {
				"bn": "যশোর",
				"en": "Jessore"
			}
		},
		"additionalNotes": "",
		"createdAt": "2022-01-07T05:29:38.660Z",
		"stoppages": [],
		"minPrice": 1331.333,
		"maxPrice": 13412,
		"bookingStatus": "requested",
		"biddings": [],
		"trips": [],
		"company": {
			"id": 1,
			"name": "steeltes",
			"createdAt": "2021-12-29T01:34:45.113Z",
			"companyLat": 120.213123,
			"companyLng": -72.1231,
			"companySuburb": {
				"nameBn": "ঢাকাs",
				"nameEn": "bang"
			},
			"companyAddress": {
				"nameBn": "ঢাsকা",
				"nameEn": "pasdasdassdad,asdasdaasdasadds"
			},
			"companyCountry": {
				"nameBn": "বাংলাদেশ",
				"nameEn": "asdasdasdadasdas"
			},
			"companyDistrict": {
				"nameBn": "ঢাকাs",
				"nameEn": "sssss"
			},
			"companyDivision": {
				"nameBn": "ঢাকা",
				"nameEn": "sdsdadada"
			}
		}
	]
}
```
### 1.27 Activate trip by vendor
* **Description**: Vendor gets activate trip which trip he has won in bidding
* **Permission role**: vendor
* **Method**:`PUT`
* **Api path**:`/vendor/booking/activate-trip/`
* **Headers**: `Authorization` : `Bearer {access_token}`
* **Request Body**:
| Field Name | Sample Data |
| -------- | -------- |
| `tripId`: `number`| `1` |
| `truckId`: `number`| `1` |
| `driverId`: `number`| `1` |
* **Response**:
```status_code: 200```
```json=
{
	"success": true,
	"message": "Trip has activated successfully.",
	"data": {
		"id": 11,
		"truckQuantity": 15,
		"remainingTrucks": 15,
		"truckType": {
			"id": 38,
			"status": "active",
			"truckTypeBn": "২০ ফুট খোলা ট্রাক",
			"truckTypeEn": "20FT Open Truck"
		},
		"fromLocation": {
			"address": "Mongla Port, Mongla, Bangladesh",
			"latitude": 22.49046969999999,
			"longitude": 89.59160519999999,
			"addressLocale": {
				"bn": "Mongla Port",
				"en": "Mongla Por"
			}
		},
		"toLocation": {
			"address": "Jessore Post Office",
			"latitude": 23.163687,
			"longitude": 89.208563,
			"addressLocale": {
				"bn": "যশর পোস্ট অফিস, যশর সদর, যশর সদর, যশর",
				"en": "Jessore Post Office, Jessore Sadar, Jessore"
			}
		},
		"fromDistrict": {
			"address": "Bagerhat, Khulna, Bangladesh",
			"latitude": 22.651568,
			"longitude": 89.785938,
			"addressLocale": {
				"bn": "বাগেরহাট",
				"en": "Bagerhat"
			}
		},
		"toDistrict": {
			"address": "Jessore, Khulna, Bangladesh",
			"latitude": 23.16643,
			"longitude": 89.2081126,
			"addressLocale": {
				"bn": "যশোর",
				"en": "Jessore"
			}
		},
		"additionalNotes": "",
		"createdAt": "2022-01-07T05:29:38.660Z",
		"stoppages": [],
		"minPrice": 1331.333,
		"maxPrice": 13412,
		"bookingStatus": "requested",
		"biddings": [],
		"trips": [],
		"company": {
			"id": 1,
			"name": "steeltes",
			"createdAt": "2021-12-29T01:34:45.113Z",
			"companyLat": 120.213123,
			"companyLng": -72.1231,
			"companySuburb": {
				"nameBn": "ঢাকাs",
				"nameEn": "bang"
			},
			"companyAddress": {
				"nameBn": "ঢাsকা",
				"nameEn": "pasdasdassdad,asdasdaasdasadds"
			},
			"companyCountry": {
				"nameBn": "বাংলাদেশ",
				"nameEn": "asdasdasdadasdas"
			},
			"companyDistrict": {
				"nameBn": "ঢাকাs",
				"nameEn": "sssss"
			},
			"companyDivision": {
				"nameBn": "ঢাকা",
				"nameEn": "sdsdadada"
			}
		}
	}
}
```


### 1.28 Trip details by kam
* **Description**: Kam get a single trip details
* **Permission role**: kam
* **Method**:`GET`
* **Api path**:`/kam/booking/trips/{tripId}`
* **Headers**: `Authorization` : `Bearer {access_token}` 
* **Request Body**:
`no response body`
* **Response**:
```status_code: 200```
```json=
{
	"success": true,
	"message": "Trip list gets successfully.",
	"data": {
		"id": 30,
		"fareAmount": 5650,
		"demurrage": 0,
		"totalAmount": 5650,
		"startedAt": "2022-01-20T18:01:24.388Z",
		"truck": {
			"id": 51,
			"truckType": {
				"id": 47,
				"status": "active",
				"truckTypeBn": "ফ্ল্যাট বেড ট্রেলার: ৫ এক্সেল ৪০ ফুট",
				"truckTypeEn": "Flat Bed Trailer: 5XL 40FT"
			},
			"truckModelNo": null,
			"truckCategory": {
				"id": 4,
				"status": "active",
				"truckCategoryBn": "কাভার্ড ভ্যান",
				"truckCategoryEn": "Covered Van"
			},
			"licensePlateNoBn": "ঢাকা মেট্রো অ ১৭৭৬৬০",
			"licensePlateNoEn": "ঢাকা মেট্রো অ ১৭৭৬৬০",
			"truckAvailability": "available",
			"licensePlateNoTextBn": "ঢাকা মেট্রো - অ - ১৭৭৬৬০",
			"licensePlateNoTextEn": "Dhaka Metro - AW - 177660"
		},
		"driver": {
			"id": 2,
			"phone": "+8801631699719",
			"fullName": "Mahbub alam ",
			"createdAt": "2021-12-27T07:08:21.681Z",
			"driverAvailability": "available"
		},
		"endedAt": "2022-01-20T18:01:49.077Z",
		"status": "active",
		"tripStatus": "completed",
		"documents": [],
		"tripHistories": [
			{
				"id": 2,
				"tripStatus": "activated",
				"statusText": "Going to loading point",
				"createdAt": "2022-01-20T17:59:30.754Z"
			},
		],
		"bidding": {
			"id": 69,
			"numberOfTrucks": 1,
			"proposedAmountPerTruck": 100,
			"proposedAmount": 100,
			"confirmed": true,
			"createdAt": "2022-01-20T15:53:36.885Z"
		}
	}
}
```
### 1.29 Trip status update by shipper agent
* **Description**: Trip status can be updated 
* **Permission role**: shipping agent
* **Method**:`PUT`
* **Api path**:`/shipper-agent/booking/`
* **Headers**: `Authorization` : `Bearer {access_token}`
* **Input Query**

| Query Name | Sample Data |
| -------- | -------- |
| `tripId`: `number` | `1` |
| `tripStatus`: `string` | `pending`, `active`, `goods_loaded`, `goods_unloaded`, `completed`, `on_way`, `cancelled` |
* **Request Body**:
`no response body`
* **Response**:
```status_code: 200```
```json=
{
	"success": true,
	"message": "Trip has been successfully completed.",
	"data": {
		"id": 30,
		"fareAmount": 5650,
		"demurrage": 0,
		"totalAmount": 5650,
		"startedAt": "2022-01-20T18:01:24.388Z",
		"truck": {
			"id": 51,
			"truckType": {
				"id": 47,
				"status": "active",
				"truckTypeBn": "ফ্ল্যাট বেড ট্রেলার: ৫ এক্সেল ৪০ ফুট",
				"truckTypeEn": "Flat Bed Trailer: 5XL 40FT"
			},
			"truckModelNo": null,
			"truckCategory": {
				"id": 4,
				"status": "active",
				"truckCategoryBn": "কাভার্ড ভ্যান",
				"truckCategoryEn": "Covered Van"
			},
			"licensePlateNoBn": "ঢাকা মেট্রো অ ১৭৭৬৬০",
			"licensePlateNoEn": "ঢাকা মেট্রো অ ১৭৭৬৬০",
			"truckAvailability": "available",
			"licensePlateNoTextBn": "ঢাকা মেট্রো - অ - ১৭৭৬৬০",
			"licensePlateNoTextEn": "Dhaka Metro - AW - 177660"
		},
		"driver": {
			"id": 2,
			"phone": "+8801631699719",
			"fullName": "Mahbub alam ",
			"createdAt": "2021-12-27T07:08:21.681Z",
			"driverAvailability": "available"
		},
		"endedAt": "2022-01-20T18:01:49.077Z",
		"status": "active",
		"tripStatus": "completed",
		"documents": [],
		"tripTimelines": [
			{
				"id": 2,
				"tripStatus": "activated",
				"statusText": "Going to loading point",
				"createdAt": "2022-01-20T17:59:30.754Z"
			},
			{
				"id": 3,
				"tripStatus": "goods_loaded",
				"statusText": "Goods have been loaded",
				"createdAt": "2022-01-20T18:01:24.274Z"
			},
			{
				"id": 4,
				"tripStatus": "on_way",
				"statusText": "Truck is on way to destination",
				"createdAt": "2022-01-20T18:01:24.274Z"
			},
			{
				"id": 5,
				"tripStatus": "goods_unloaded",
				"statusText": "Goods have been unloaded",
				"createdAt": "2022-01-20T18:01:48.760Z"
			},
			{
				"id": 6,
				"tripStatus": "completed",
				"statusText": "Trip has been successfully completed.",
				"createdAt": "2022-01-20T18:01:48.760Z"
			}
		],
		"bidding": {
			"id": 69,
			"numberOfTrucks": 1,
			"proposedAmountPerTruck": 100,
			"proposedAmount": 100,
			"confirmed": true,
			"createdAt": "2022-01-20T15:53:36.885Z"
		}
	}
}
```
### 1.30 Activate trip by KAM, cluster head
* **Description**: KAM and C/H activate a trip using following queries
* **Permission role**: vendor
* **Method**:`GET`
* **Api path**:`/kam/booking/activate-trip`
* **Headers**: `Authorization` : `Bearer {access_token}` 
* **Input Query**:

| Query Name | Sample Data |
| -------- | -------- |
| `tripId`: `number`| `1` |
| `truckId`: `number`| `1` |
| `driverId`: `number`| `1` |
* **Request Body**:
`no response body`
* **Response**:
```status_code: 200```
```json=
Same as 1.27
```