---
# System prepended metadata

title: Food Slotting APIs

---

# Food Slotting APIs

## PRD link
https://docs.google.com/document/d/1kAQlcyQFwwy8EKKUHxmz0ZiqiRGN6l1tB5RpP_JvAeY/edit

## Dashboard API

### Add drivers to time slot
- API: `/api/v1/time-slots/<time_slot_id>/drivers`
- Method: `POST`
- Query Param:
  - `allow_blocked_drivers`: Optional. Defaults to false
- Request Body: Drivers id or phone number is required.
  ```json
  {
      "ids": [1, 2],
      "created_by": "<user_name>"
  }
  ```
  or
  ```json
  {
      "phone_numbers": ["01821111111", "01821122222"],
      "created_by": "<user_name>"
  }
  ```
- Response:
  - code: 206 [New response case]
    ```json
    {
        "success": true,
        "message": "some drivers are blocked",
        "data": {
            "is_blocked": true,
            "ids": [112, 3434, 342]
        }
    }
    ```

### Approve single driver booking
- API: `/api/v1/time-slots/<time_slot_id>/drivers/<driver_id>`
- Method: `PUT`
- Query Param:
  - `allow_blocked_drivers`: Optional. Defaults to false
- Request Body: Required.
  ```json
  {
      "updated_by": "<user_name>"
  }
  ```
- Response:
  - code: 206 [New response case]
    ```json
    {
        "success": true,
        "message": "some drivers are blocked",
        "data": {
            "is_blocked": true
        }
    }
    ```

### Approve list of drivers booking 
- API: `/api/v1/time-slots/<time_slot_id>/drivers`
- Method: `PUT`
- Query Param:
  - `allow_blocked_drivers`: Optional. Defaults to false
- Request Body: Required.
  ```json
  {
    "updated_by": "me",
    "ids": [1]
  }
  ```
- Response:
  - code: 206 [New response case]
    ```json
    {
        "success": true,
        "message": "some drivers are blocked",
        "data": {
            "is_blocked": true,
            "ids": [112, 3434, 342]
        }
    }
    ```
