---
# System prepended metadata

title: DOKUMENTASI API

---

# DOKUMENTASI API

---
## USER CREDENTIAL
### 1. Login

Login user data

- Endpoint : `POST /api/auth/login`
- Request : 
```json 
{
    "username": "admin",
    "password": "admin123"
}
```
- Response :
  - Status Code : 200

```json
{
    "status": {
        "code": 201,
        "description": "Login Success"
    },
    "data": {
        "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MTc5MDA5NjcsImlzcyI6IlJvb21pZnktQXBwIiwidXNlcl9pZCI6IjMiLCJyb2xlIjoiYWRtaW4ifQ.fLVopr1TZxLWs2PVvri9L1UE5PM-5_lG2hfXDg7EUJw",
        "user_id": "3"
    }
}
```

### 2. Get User Login List

Retrieve the list of user login with pagination.

- End Point: `GET /api/auth/user`
  - Query parameters
```
page ( optional )
- Specifies the desired page. Default value is 1.

size ( optional )
- Specifies the number of rows per page. Default value is 10.
```
- Header :
  - Authorization : `Bearer <jwt_token>`
- Response : 
  - Status Code : 200
```json
{
    "status": {
        "code": 200,
        "description": "Success Get List User Credential"
    },
    "data": [
        [
            {
                "id": "1",
                "username": "budi",
                "password": "4dea3a8e63f43542fe75f17e6c5977f50e39398ac10d6293de1460b457305d84512560611c240d48bab4a903cbdde7593baf4b5c9dbe77a2aab17c1e9b08597a",
                "token": ""
            },
            {
                "id": "2",
                "username": "siti",
                "password": "9b399c9cc4b3bc34b64b2bb1672e2f2ebffaef70ada921513cefea8ace0287e5a9bf8352f3fea80dc274307a425d3fceee39963165ef9f220f4c3dec165db44c",
                "token": ""
            },
            {
                "id": "3",
                "username": "admin",
                "password": "7fcf4ba391c48784edde599889d6e3f1e47a27db36ecc050cc92f259bfac38afad2c68a1ae804d77075e8fb722503f3eca2b2c1006ee6f6c7b7628cb45fffd1d",
                "token": ""
            },
            {
                "id": "ee5aaac4-8177-49f7-b532-78fa6588069e",
                "username": "farhan",
                "password": "3c9909afec25354d551dae21590bb26e38d53f2173b8d3dc3eee4c047e7ab1c1eb8b85103e3be7ba613b31bb5c9c36214dc9f14a42fd7a2fdb84856bca5c44c2",
                "token": ""
            },
            {
                "id": "66495ee7-399f-47c6-8b2e-27799dd7869f",
                "username": "didik",
                "password": "3c9909afec25354d551dae21590bb26e38d53f2173b8d3dc3eee4c047e7ab1c1eb8b85103e3be7ba613b31bb5c9c36214dc9f14a42fd7a2fdb84856bca5c44c2",
                "token": ""
            }
        ]
    ],
    "paging": {
        "Page": 1,
        "RowsPerPage": 10,
        "TotalRows": 5,
        "TotalPages": 1
    }
}
```
### 3. Get User Login By Id

Retrieve the user login data by Id.

- End Point: `GET /api/auth/user/:id`
- Header :
  - Authorization : `Bearer <jwt_token>`
- Response : 
  - Status Code : 200
```json
{
    "status": {
        "code": 200,
        "description": "Success Get User Credential Data"
    },
    "data": {
        "id": "1",
        "username": "budi",
        "password": "4dea3a8e63f43542fe75f17e6c5977f50e39398ac10d6293de1460b457305d84512560611c240d48bab4a903cbdde7593baf4b5c9dbe77a2aab17c1e9b08597a",
        "token": ""
    }
}
```

### 4. Create New User Login

Create new user login data

- Endpoint : `POST /auth/api/user`
- Header :
  - Authorization : `Bearer <jwt_token>`
- Request : 
```json 
{
    "username": "hisyam",
    "password": "anjay123"
}
```
- Response :
  - Status Code : 200

```json
{
    "status": {
        "code": 201,
        "description": "Success Create New User"
    },
    "data": {
        "id": "a020a158-225b-404f-a3e1-e4e1e9f05ba3",
        "username": "hisyam",
        "password": "f809d09432eef52fa712d03c15eb76933ef50a60802a993714652875364aa8f48425efac9cd3a122c7dc38ffda814937b0a66b7ab5ea107d297cc8d0837acd19",
        "token": ""
    }
}
```

### 5. Update Password User Login

Update password user login

- Endpoint : `PUT /api/auth/user`
- Header :
  - Authorization : `Bearer <jwt_token>`
- Request : 
```json 
{
    "id": "a020a158-225b-404f-a3e1-e4e1e9f05ba3",
    "old_password": "anjay123",
    "new_password": "123anjay"
}
```
- Response :
  - Status Code : 200

```json
{
    "code": 200,
    "description": "Success Update User Password"
}
```

### 6. Delete User Login

Delete user login data

- Endpoint : `DELETE /api/auth/user/:id`
- Header :
  - Authorization : `Bearer <jwt_token>`
- Response :
  - Status Code : 200

```json
{
    "code": 200,
    "description": "Success Delete User Credential Data"
}
```

---

## USER PROFILE
### 1. Get User List

Retrieve the list of users with pagination.

- End Point: `GET /api/user`
  - Query parameters
```
page ( optional )
- Specifies the desired page. Default value is 1.

size ( optional )
- Specifies the number of rows per page. Default value is 10.
```
- Header :
  - Authorization : `Bearer <jwt_token>`
- Response : 
  - Status Code : 200
```json
{
    "status": {
        "code": 200,
        "description": "Success Get List User"
    },
    "data": [
        [
            {
                "id": "3",
                "full_name": "Admin",
                "division": {
                    "id": "1",
                    "name": "admin"
                },
                "address": "789 Pine St",
                "phone_number": "3456789012",
                "user_credential": {
                    "id": "3",
                    "username": "admin",
                    "password": "7fcf4ba391c48784edde599889d6e3f1e47a27db36ecc050cc92f259bfac38afad2c68a1ae804d77075e8fb722503f3eca2b2c1006ee6f6c7b7628cb45fffd1d",
                    "token": ""
                },
                "role": {
                    "id": "1",
                    "position": "admin"
                }
            },
            {
                "id": "1",
                "full_name": "Budi",
                "division": {
                    "id": "2",
                    "name": "finance"
                },
                "address": "123 Main St",
                "phone_number": "1234567890",
                "user_credential": {
                    "id": "1",
                    "username": "budi",
                    "password": "4dea3a8e63f43542fe75f17e6c5977f50e39398ac10d6293de1460b457305d84512560611c240d48bab4a903cbdde7593baf4b5c9dbe77a2aab17c1e9b08597a",
                    "token": ""
                },
                "role": {
                    "id": "2",
                    "position": "employee"
                }
            },
            {
                "id": "2",
                "full_name": "Siti",
                "division": {
                    "id": "5",
                    "name": "manager"
                },
                "address": "456 Oak St",
                "phone_number": "2345678901",
                "user_credential": {
                    "id": "2",
                    "username": "siti",
                    "password": "9b399c9cc4b3bc34b64b2bb1672e2f2ebffaef70ada921513cefea8ace0287e5a9bf8352f3fea80dc274307a425d3fceee39963165ef9f220f4c3dec165db44c",
                    "token": ""
                },
                "role": {
                    "id": "3",
                    "position": "ga"
                }
            }
        ]
    ],
    "paging": {
        "Page": 1,
        "RowsPerPage": 10,
        "TotalRows": 3,
        "TotalPages": 1
    }
}
```

### 2. Get User By Id

Retrieve the users data by Id.

- End Point: `GET /api/user/:id`
- Header :
  - Authorization : `Bearer <jwt_token>`
- Response : 
  - Status Code : 200
```json
{
    "status": {
        "code": 200,
        "description": "Success Get User By Id"
    },
    "data": {
        "id": "1",
        "full_name": "Budi",
        "division": {
            "id": "2",
            "name": "finance"
        },
        "address": "123 Main St",
        "phone_number": "1234567890",
        "user_credential": {
            "id": "1",
            "username": "budi",
            "password": "4dea3a8e63f43542fe75f17e6c5977f50e39398ac10d6293de1460b457305d84512560611c240d48bab4a903cbdde7593baf4b5c9dbe77a2aab17c1e9b08597a",
            "token": ""
        },
        "role": {
            "id": "2",
            "position": "employee"
        }
    }
}
```

### 3. Get User By Username

Retrieve the users data by Username.

- End Point: `GET /api/user/user/:username`
- Header :
  - Authorization : `Bearer <jwt_token>`
- Response : 
  - Status Code : 200
```json
{
    "status": {
        "code": 200,
        "description": "Success Get User By Username"
    },
    "data": {
        "id": "1",
        "full_name": "Budi",
        "division": {
            "id": "2",
            "name": "finance"
        },
        "address": "123 Main St",
        "phone_number": "1234567890",
        "user_credential": {
            "id": "1",
            "username": "budi",
            "password": "4dea3a8e63f43542fe75f17e6c5977f50e39398ac10d6293de1460b457305d84512560611c240d48bab4a903cbdde7593baf4b5c9dbe77a2aab17c1e9b08597a",
            "token": ""
        },
        "role": {
            "id": "2",
            "position": "employee"
        }
    }
}
```

### 4. Create New User

Create new user data

- Endpoint : `POST /api/user`
- Header :
  - Authorization : `Bearer <jwt_token>`
- Request : 
```json 
{
    "full_name": "Mochamad Farhan Ali",
    "division_id": "1",
    "address": "Jakarta",
    "phone_number": "081234567890",
    "user_id": "ee5aaac4-8177-49f7-b532-78fa6588069e",
    "role_id": "1"
}
```
- Response :
  - Status Code : 200

```json
{
    "status": {
        "code": 201,
        "description": "Success Register new User"
    },
    "data": {
        "id": "078683af-2c2b-42a7-b1f9-1f71485d92fa",
        "full_name": "Mochamad Farhan Ali",
        "division_id": "1",
        "address": "Jakarta",
        "phone_number": "081234567890",
        "user_id": "ee5aaac4-8177-49f7-b532-78fa6588069e",
        "role_id": "1"
    }
}
```

### 5. Update User

Update existing user data

- Endpoint : `PUT /api/user`
- Header :
  - Authorization : `Bearer <jwt_token>`
- Request : 
```json 
{
    "id": "4",
    "full_name": "Farhan",
    "division_id": "1",
    "address": "Cianjur",
    "phone_number": "081234567890",
    "user_id": "ee5aaac4-8177-49f7-b532-78fa6588069e",
    "role_id": "1"
}
```
- Response :
  - Status Code : 200

```json
{
    "status": {
        "code": 200,
        "description": "Success Update User By Id"
    },
    "data": {
        "id": "",
        "full_name": "Farhan",
        "division_id": "1",
        "address": "Cianjur",
        "phone_number": "081234567890",
        "user_id": "ee5aaac4-8177-49f7-b532-78fa6588069e",
        "role_id": "1"
    }
}
```

### 6. Delete User

Delete existing user data

- Endpoint : `DELETE /api/user/:id`
- Header :
  - Authorization : `Bearer <jwt_token>`
- Response :
  - Status Code : 200

```json
{
    "code": 200,
    "description": "Success Delete User By Id"
}

```

---

## DIVISION
### 1. Get List Division

Retrieve the list of division

- Endpoint : `GET /api/divisions`
  - Query :
```
page ( optional )
- Specifies the desired page.

size ( optional )
- Specifies the number of rows per page.
```

- Header :
  - Authorization : `Bearer <jwt_token>`
- Response :
  - Status Code : 200

```json 
{
    "status": {
        "code": 200,
        "description": "Success Get List Division"
    },
    "data": [
        [
            {
                "id": "1",
                "name": "admin"
            },
            {
                "id": "2",
                "name": "finance"
            }
        ]
    ],
    "paging": {
        "Page": 1,
        "RowsPerPage": 10,
        "TotalRows": 4,
        "TotalPages": 1
    }
}
```

### 2. Get By Id Divisions

Retrieve the get divisions data by Id

- Endpoint : `GET /api/divisions/:id`
- Header :
  - Authorization : `Bearer <jwt_token>`
- Response :
  - Status Code : 200

```json 
{
    "status": {
        "code": 200,
        "description": "Success Get Division By ID"
    },
    "data": {
        "id": "1",
        "name": "admin"
    }
}
```

### 3. Create New Divisions

Create new divisions data

- Endpoint : `POST /api/divisions`
- Header :
  - Authorization : `Bearer <jwt_token>`
- Request : 
```json 
{
    "name": "my division",
}
```
- Response :
  - Status Code : 200

```json
{
    "status": {
        "code": 201,
        "description": "Division created successfully"
    },
    "data": {
        "id": "4d8cc68a-3913-45b2-83f8-bdc7e23a2a70",
        "name": "my division"
    }
}
```

### 4. Update Divisions

Update existing divisions data

- Endpoint : `PUT /api/divisions`
- Header :
  - Authorization : `Bearer <jwt_token>`
- Request : 
```json 
{
    "id": "4d8cc68a-3913-45b2-83f8-bdc7e23a2a70",
    "name": "division 5"
}
```
- Response :
  - Status Code : 200

```json
{
    "status": {
        "code": 200,
        "description": "Division updated successfully"
    },
    "data": {
        "id": "4d8cc68a-3913-45b2-83f8-bdc7e23a2a70",
        "name": "division 5"
    }
}
```

### 5. Delete Divisions

Update existing divisions data

- Endpoint : `DELETE /api/divisions/:id`
- Header :
  - Authorization : `Bearer <jwt_token>`
- Response :
  - Status Code : 200

```json
{
    "code": 200,
    "description": "Division deleted successfully"
}
```
    
---
## ROOM
### 1. Create Room

Creating room.

- End Point: `POST /api/room`
- Header :
  - Authorization : `Bearer <jwt_token>`
- Role :
  - Admin
- Request :
  - Status Code : 200
```json 
{
    "name": "B01",
    "room_type_id": "iu7y87b87876b9823",
    "capacity": 10,
    "is_reserveable": true
}
```
- Response : 
  - Status Code : 201
```json
{
    "status": {
        "code": 201,
        "description": "Success Create Room"
    },
    "data": {
        "id": "cbb6b154-3cd6-4d6d-981d-989a8aae8f3a",
        "name": "B01",
        "room_type_id": "iu7y87b87876b9823",
        "capacity": 10,
        "is_available": true,
        "is_reserveable": true
    }
}
```
### 2. Update Room

Updating room.

- End Point: `PUT /api/room`
- Header :
  - Authorization : `Bearer <jwt_token>`
- Role :
  - Admin
- Request :
```json 
{
    "id": "0",
    "name": "Warehouse 1",
    "room_type_id": "0",
    "capacity": 11,
    "is_reserveable": false
}
```
- Response : 
  - Status Code : 200
```json
{
    "status": {
        "code": 200,
        "description": "Success Update Room"
    },
    "data": {
        "id": "0",
        "name": "Warehouse 1",
        "room_type_id": "0",
        "capacity": 11,
        "is_reserveable": false
    }
}
```
### 3. Delete Room By Id

Delete room data by Id.

- End Point: `DELETE /api/room/:id`
- Parameter:
    - id ( mandatory )
- Header :
  - Authorization : `Bearer <jwt_token>`
- Role :
  - Admin
- Response : 
  - Status Code : 200
```json
{
    "code": 200,
    "description": "Success delete data Room"
}
```

### 4. Update status Room By Id

Update is_available room data by Id.

- End Point: `PUT /api/room/`
- Header :
  - Authorization : `Bearer <jwt_token>`
- Role :
  - Admin, Ga
- Request :
```json
{
    "id": "0",
    "is_available": false
}
```
- Response : 
  - Status Code : 200
```json
{
    "status": {
        "code": 200,
        "description": "Success Update Room"
    },
    "data": {
        "id": "0",
        "is_available": false
    }
}
```

### 5. Get Room List

Retrieve the list of rooms with pagination.

- End Point: `GET /api/room`
  - Query parameters
    - `page ( optional )`
        -- Specifies the desired page. Default value is 1.
    - `size ( optional )`
        -- Specifies the number of rows per page. Default value is 10.
    - `type ( optional )`
        -- Filters by type.
- Header :
  - Authorization : `Bearer <jwt_token>`
- Role :
  - Admin, Ga, Employee
- Response :
  - Status Code : 200 
```json
{
    "status": {
        "code": 200,
        "description": "Success Get All Room"
    },
    "data": [
        {
            "id": "1",
            "name": "Conference Room 1",
            "roomtype": "Conference",
            "capacity": 10,
            "is_available": true,
            "is_reserveable": true,
            "facilities": [
                {
                    "id": "1",
                    "name": "Projector 1",
                    "room_id": "1"
                }
            ]
        }
    ],
    "paging": {
        "Page": 1,
        "RowsPerPage": 1,
        "TotalRows": 6,
        "TotalPages": 6
    }
}
```

### 6. Get Room By Id Or Name

Retrieve the rooms data by Id.

- End Point: `GET /api/room/:id`
- Parameter:
    - id or name ( mandatory )
- Header :
  - Authorization : `Bearer <jwt_token>`
- Role :
  - Admin, Ga, Employee
- Response : 
  - Status Code : 200
```json
{
    "status": {
        "code": 200,
        "description": "Success Get data Room"
    },
    "data": [
        {
            "id": "1",
            "name": "Conference Room 1",
            "roomtype": "Conference",
            "capacity": 10,
            "is_available": true,
            "is_reserveable": true,
            "facilities": [
                {
                    "id": "1",
                    "name": "Projector 1",
                    "room_id": "1"
                }
            ]
        }
    ]
}
```

### 7. Get Room By Available

Retrieve the rooms data by available is true.

- End Point: `GET /api/room/available
    - `type ( optional )`
        -- Filters by type.
- Header :
  - Authorization : `Bearer <jwt_token>`
- Role :
  - Admin, Ga, Employee
- Response : 
    - Status Code : 200
```json
{
    "status": {
        "code": 200,
        "description": "Success Get data Room"
    },
    "data": [
        {
            "id": "1",
            "name": "Conference Room 1",
            "roomtype": "Conference",
            "capacity": 10,
            "is_available": true,
            "is_reserveable": true,
            "facilities": [
                {
                    "id": "1",
                    "name": "Projector 1",
                    "room_id": "1"
                },
                {
                    "id": "5",
                    "name": "Video Conferencing 2",
                    "room_id": "1"
                }
            ]
        }
    ]
}
```
---

## ROOM TYPE
### 1. Get List Room Type

Retrieve the list of room type

- Endpoint : `GET /api/type/room`
- Header :
  - Authorization : `Bearer <jwt_token>`
- Role :
  - Admin
- Response :
    - Status Code : 200
```json 
{
    "status": {
        "code": 200,
        "description": "Success get all Roomtype"
    },
    "data": [
        {
            "id": "0",
            "name": "Warehouse"
        }
    ]
}
```

### 2. Get By Id Room Type

Retrieve the get room type data by Id

- Endpoint : `GET /api/type/room/:id`
- Header :
  - Authorization : `Bearer <jwt_token>`
- Response :
  - Status Code : 200

```json 
{
    "status": {
        "code": 200,
        "description": "Success Get data roomtype by id or name"
    },
    "data": {
        "id": "0",
        "name": "Warehouse"
    }
}
```

### 3. Create New Room Type

Create new room type data

- Endpoint : `POST /api/type/room`
- Header :
  - Authorization : `Bearer <jwt_token>`
- Request : 
```json 
{
    "name": "wakwau",
}
```
- Response :
  - Status Code : 200

```json
{
    "status": {
        "code": 201,
        "description": "Success create roomtype"
    },
    "data": {
        "id": "1598a45d-5323-49e3-9ed6-e96372d9feb0",
        "name": "wakwau"
    }
}
```

### 4. Update Room Type

Update existing room type data

- Endpoint : `PUT /api/type/room`
- Header :
  - Authorization : `Bearer <jwt_token>`
- Request : 
```json 
{
    "id": "1",
    "name": "ConferenceUpdated"
}
```
- Response :
  - Status Code : 200

```json
{
    "status": {
        "code": 200,
        "description": "Success update roomtype"
    },
    "data": {
        "id": "1",
        "name": "ConferenceUpdated"
    }
}
```

### 5. Delete Divisions

Update existing divisions data

- Endpoint : `DELETE /api/type/room/:id`
- Header :
  - Authorization : `Bearer <jwt_token>`
- Response :
  - Status Code : 200

```json
{
    "code": 200,
    "description": "room type deleted successfully"
}
```
    
---
## FACILITY
### 1. Get List Facility

Retrieve the list of facility

- Endpoint : `GET /api/facility`
  - Query :
```
page ( optional )
- Specifies the desired page.

size ( optional )
- Specifies the number of rows per page.
```

- Header :
  - Authorization : `Bearer <jwt_token>`
- Response :
  - Status Code : 200

```json 
{
    "status": {
        "code": 200,
        "description": "Success Get List Facility"
    },
    "data": [
        [
            {
                "id": "1",
                "name": "Projector 1",
                "is_available": true,
                "is_reserveable": false,
                "room_id": "1"
            },
            {
                "id": "2",
                "name": "Projector 2",
                "is_available": true,
                "is_reserveable": false,
                "room_id": "2"
            }
        ]
    ],
    "paging": {
        "Page": 1,
        "RowsPerPage": 10,
        "TotalRows": 2,
        "TotalPages": 1
    }
}
```

### 2. Get By Id Facility

Retrieve the get facility data by Id

- Endpoint : `GET /api/facility/:id`
- Header :
  - Authorization : `Bearer <jwt_token>`
- Response :
  - Status Code : 200

```json 
{
    "status": {
        "code": 201,
        "description": "Success Get Id Facility"
    },
    "data": {
        "id": "1",
        "name": "Projector 1",
        "is_available": true,
        "is_reserveable": false,
        "room_id": "1"
    }
}
```

### 3. Create New Facility

Create new facility data

- Endpoint : `POST /api/facility`
- Header :
  - Authorization : `Bearer <jwt_token>`
- Request : 
```json 
{
    "name": "Whiteboard 3",
    "is_available": true,
    "is_reserveable": true,
    "room_id": "0"
}
```
- Response :
  - Status Code : 200

```json
{
    "status": {
        "code": 201,
        "description": "Success Register new Facility"
    },
    "data": {
        "id": "10",
        "name": "Whiteboard 3",
        "is_available": true,
        "is_reserveable": true,
        "room_id": "0"
    }
}
```

### 4. Update Facility

Update existing facility data

- Endpoint : `PUT /api/facility`
- Header :
  - Authorization : `Bearer <jwt_token>`
- Request : 
```json 
{
    "id": "10",
    "name": "Whiteboard 4",
    "is_available": true,
    "is_reserveable": true,
    "room_id": "0"
}
```
- Response :
  - Status Code : 200

```json
{
    "status": {
        "code": 200,
        "description": "Success Facility Update"
    },
    "data": {
        "id": "10",
        "name": "Whiteboard 4",
        "is_available": true,
        "is_reserveable": true,
        "room_id": "0"
    }
}
```

### 5. Delete Facility

Update existing facility data

- Endpoint : `DELETE /api/facility/:id`
- Header :
  - Authorization : `Bearer <jwt_token>`
- Response :
  - Status Code : 200

```json
{
    "code": 200,
    "description": "Success Facility Delete"
}
```

---
## RESERVATION
### 1. Get List Reservation

Retrieve the list of room reservation request.

- Endpoint : `GET /api/reservation`
  - Query :
```
fl_status ( optional )
- Used to set filters related to the status of room reservation requests.

fl_start_date ( optional )
fl_end_date ( optional )
- Used to set filters based on reservation dates.

fL_room_id ( optional )
- Used to set filters based on room id.

page ( optional )
- Specifies the desired page. Default is 1.

size ( optional )
- Specifies the number of rows per page. Default is 10.
```

- Header :
  - Authorization : `Bearer <jwt_token>`
- Response :
  - Status Code : 200
```json!
{
    "status": {
        "code": 200,
        "description": "Success Get List Reservation"
    },
    "data": [
        [
            {
                "id": "1",
                "user_profile": {
                    "id": "1",
                    "full_name": "Budi",
                    "division": {
                        "id": "2",
                        "name": "finance"
                    },
                    "role": {
                        "id": "2",
                        "position": "employee"
                    },
                    "address": "123 Main St",
                    "phone_number": "1234567890"
                },
                "reservation_date": "2024-06-04T10:00:00",
                "start_time": "2024-06-04T12:00:00",
                "end_time": "2024-06-04T14:00:00",
                "reservation_status": {
                    "id": "1",
                    "name": "Pending"
                },
                "room": {
                    "id": "1",
                    "name": "Conference Room 1",
                    "roomtype": {
                        "id": "1",
                        "name": "Conference"
                    },
                    "capacity": 10,
                    "is_available": true,
                    "is_reserveable": true,
                    "facility": [
                        {
                            "id": "1",
                            "name": "Projector 1",
                            "is_available": true,
                            "is_reserveable": false,
                            "room_id": "1"
                        },
                        {
                            "id": "5",
                            "name": "Video Conferencing 2",
                            "is_available": true,
                            "is_reserveable": false,
                            "room_id": "1"
                        }
                    ]
                },
                "request_message": "kebutuhan meeting",
                "response_message": "",
                "additional_facility": [
                    {
                        "id": "6",
                        "name": "Sound System 1",
                        "is_available": true,
                        "is_reserveable": true,
                        "room_id": "0"
                    },
                    {
                        "id": "7",
                        "name": "Coffee Machine 1",
                        "is_available": true,
                        "is_reserveable": true,
                        "room_id": "0"
                    }
                ]
            },
            {
                "id": "3",
                "user_profile": {
                    "id": "3",
                    "full_name": "Admin",
                    "division": {
                        "id": "1",
                        "name": "admin"
                    },
                    "role": {
                        "id": "1",
                        "position": "admin"
                    },
                    "address": "789 Pine St",
                    "phone_number": "3456789012"
                },
                "reservation_date": "2024-06-06T08:00:00",
                "start_time": "2024-06-06T10:00:00",
                "end_time": "2024-06-06T12:00:00",
                "reservation_status": {
                    "id": "1",
                    "name": "Pending"
                },
                "room": {
                    "id": "3",
                    "name": "Meeting Room 1",
                    "roomtype": {
                        "id": "2",
                        "name": "Meeting"
                    },
                    "capacity": 5,
                    "is_available": true,
                    "is_reserveable": true,
                    "facility": []
                },
                "request_message": "pembelajaran siswa",
                "response_message": "",
                "additional_facility": []
            }
        ]
    ],
    "paging": {
        "Page": 1,
        "RowsPerPage": 10,
        "TotalRows": 2,
        "TotalPages": 1
    }
}
```

### 2. Create Room Reservation Request

Create room reservation request.

- Endpoint : `POST /api/reservation`
- Header :
  - Authorization: `Bearer <jwt_token>`
- Request:
```json
{
  "start_date": "2024-06-10T14:00:00Z",
  "end_date": "2024-06-12T10:00:00Z",
  "request_message": "buat meeting sama atasan",
  "room_id": "3",
  "additional_facility": [
    {
        "facility_id": "6"
    },
    {
        "facility_id": "7"
    }
  ]
}
```
- Response : 
  - Status Code : 200 
```json
{
    "status": {
        "code": 201,
        "description": "Success Create New Reservation Request"
    },
    "data": [
        {
            "id": "1",
            "user_profile": {
                "id": "1",
                "full_name": "Budi",
                "division": {
                    "id": "3",
                    "name": "finance"
                },
                "role": {
                    "id": "3",
                    "position": "employee"
                },
                "address": "123 Main St",
                "phone_number": "1234567890"
            },
            "reservation_date": "2024-06-05T18:22:53",
            "start_time": "2024-06-10T14:00:00",
            "end_time": "2024-06-12T10:00:00",
            "reservation_status": {
                "id": "1",
                "name": "Pending"
            },
            "room": {
                "id": "3",
                "name": "Meeting Room 1",
                "roomtype": {
                    "id": "2",
                    "name": "Meeting"
                },
                "capacity": 5,
                "is_available": true,
                "is_reserveable": true,
                "facility": []
            },
            "request_message": "",
            "response_message": "",
            "additional_facility": [
                {
                    "id": "3",
                    "name": "Whiteboard 1",
                    "room_id": "0",
                    "is_available": true,
                    "is_reserveable": false
                },
                {
                    "id": "4",
                    "name": "Video Conferencing 1",
                    "room_id": "0",
                    "is_available": true,
                    "is_reserveable": false
                }
            ]
        }
    ]
}
```

### 3. Change Reservation Status

Change room reservation request status. General Affairs and Administrator can accept or decline the request. Employees can only cancel orders and cannot approve orders they have created themselves.

Status ID/Code : 
> 1 = Pending
> 2 = Cancel
> 3 = Accept
> 4 = Decline

- Endpoint : `PUT /api/reservation/status`
- Header :
  - Authorization: `Bearer <jwt_token>`
- Request :
```json 
{
    "reservation_id": "1",
    "status_id": "4",
    "response_message": "Does not meet the criteria"
}
```
- Response : 
  - Status Code : 200 
```json
{
    "status": {
        "code": 200,
        "description": "Success Change Reservation Status"
    },
    "data": [
        {
            "id": "1",
            "user_profile": {
                "id": "3",
                "full_name": "Admin",
                "division": {
                    "id": "1",
                    "name": "admin"
                },
                "role": {
                    "id": "1",
                    "position": "admin"
                },
                "address": "789 Pine St",
                "phone_number": "3456789012"
            },
            "reservation_date": "2024-06-07T00:49:21",
            "start_time": "2024-06-10T14:00:00",
            "end_time": "2024-06-12T10:00:00",
            "reservation_status": {
                "id": "4",
                "name": "Decline"
            },
            "room": {
                "id": "4",
                "name": "Meeting Room 2",
                "roomtype": {
                    "id": "2",
                    "name": "Meeting"
                },
                "capacity": 8,
                "is_available": true,
                "is_reserveable": true,
                "facility": []
            },
            "request_message": "buat meeting sama atasan",
            "response_message": "oke",
            "additional_facility": [
                {
                    "id": "7",
                    "name": "Coffee Machine 1",
                    "is_available": true,
                    "is_reserveable": true,
                    "room_id": "0"
                },
                {
                    "id": "8",
                    "name": "Whiteboard 2",
                    "is_available": true,
                    "is_reserveable": true,
                    "room_id": "0"
                }
            ]
        }
    ]
}
```
    
---