# Time off request update

`PUT /api/time-off-request/{id}`

Authentication (security requirement alternatives):

```json
[
  {
    "bearer": []
  }
]
```

- bearer: http (bearer), header JWT. Enter JWT token

Parameters:

- `id` (path, string, required)
  Type: string

Responses:

- 200: Found request time off

Content type: application/json

Type: object

Schema: [TimeOffRequest](https://sourcey-gauzy.pages.dev/api-reference/models/timeoffrequest/index.md)

- `deletedAt` (optional)
  Type: string, date-time
  
  Example:
  
  ```json
  "2018-11-21T06:20:32.232Z"
  ```

- `createdAt` (optional)
  Type: string, date-time
  
  The creation timestamp of the entity.
  
  Example:
  
  ```json
  "2018-11-21T06:20:32.232Z"
  ```

- `updatedAt` (optional)
  Type: string, date-time
  
  The last update timestamp of the entity.
  
  Example:
  
  ```json
  "2018-11-21T06:20:32.232Z"
  ```

- `id` (optional)
  Type: string

- `isActive` (optional)
  Type: boolean
  
  default: true

- `isArchived` (optional)
  Type: boolean
  
  default: false

- `archivedAt` (optional)
  Type: string, date-time
  
  Example:
  
  ```json
  "2018-11-21T06:20:32.232Z"
  ```

- `tenantId` (optional)
  Type: string

- `organizationId` (optional)
  Type: string

- `documentUrl` (optional)
  Type: string

- `description` (optional)
  Type: string

- `start` (required)
  Type: string, date-time

- `end` (required)
  Type: string, date-time

- `requestDate` (required)
  Type: string, date-time

- `status` (required)
  Type: string
  
  enum: ["REQUESTED","APPROVED","DENIED","ALL"]

- `isHoliday` (optional)
  Type: boolean
  
  default: false

- `policy` (required)
  Reference: [TimeOffPolicy](https://sourcey-gauzy.pages.dev/api-reference/models/timeoffpolicy/index.md); Type: object

- `policyId` (required)
  Type: string

- `documentId` (optional)
  Type: string

- `employees` (required)
  Reference: [Employee](https://sourcey-gauzy.pages.dev/api-reference/models/employee/index.md); Type: object

- 401: Unauthorized

- 403: Forbidden

- 404: Record not found

## Examples

### cURL

```bash
curl -X PUT 'http://localhost:3000/api/time-off-request/string' \
  -H 'Authorization: Bearer YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('http://localhost:3000/api/time-off-request/string', {
  method: 'PUT',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.put(
    'http://localhost:3000/api/time-off-request/string',
    headers={
        'Authorization': 'Bearer YOUR_TOKEN',
    },
)
print(response.text)
```
