# Update Time Slot

`PUT /api/timesheet/time-slot/{id}`

Authentication: no security requirement declared for this operation.

Parameters:

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

Request body: application/json (required)

Type: object

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

- `duration` (optional)
  Type: number

- `keyboard` (optional)
  Type: number

- `mouse` (optional)
  Type: number

- `overall` (optional)
  Type: number

- `location` (optional)
  Type: number

- `startedAt` (optional)
  Type: string, date-time

- `kbMouseActivity` (optional)
  Type: object

- `locationActivity` (optional)
  Type: object

- `customActivity` (optional)
  Type: object

- `employeeId` (optional)
  Type: string

- `activities` (optional)
  Type: array
  
  Items:
    Type: array

Responses:

- 400: Invalid input, The response body may contain clues as to what went wrong

## Examples

### cURL

```bash
curl -X PUT 'http://localhost:3000/api/timesheet/time-slot/string' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "duration": 0,
  "keyboard": 0,
  "mouse": 0,
  "overall": 0,
  "location": 0,
  "startedAt": "2024-01-15T09:30:00Z",
  "kbMouseActivity": {},
  "locationActivity": {},
  "customActivity": {},
  "employeeId": "string",
  "activities": [
    []
  ]
}'
```

### JavaScript

```javascript
const body = `{
  "duration": 0,
  "keyboard": 0,
  "mouse": 0,
  "overall": 0,
  "location": 0,
  "startedAt": "2024-01-15T09:30:00Z",
  "kbMouseActivity": {},
  "locationActivity": {},
  "customActivity": {},
  "employeeId": "string",
  "activities": [
    []
  ]
}`;

const response = await fetch('http://localhost:3000/api/timesheet/time-slot/string', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body,
});

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

### Python

```python
import requests

body = '''{
  "duration": 0,
  "keyboard": 0,
  "mouse": 0,
  "overall": 0,
  "location": 0,
  "startedAt": "2024-01-15T09:30:00Z",
  "kbMouseActivity": {},
  "locationActivity": {},
  "customActivity": {},
  "employeeId": "string",
  "activities": [
    []
  ]
}'''

response = requests.put(
    'http://localhost:3000/api/timesheet/time-slot/string',
    data=body.encode('utf-8'),
    headers={
        'Content-Type': 'application/json',
    },
)
print(response.text)
```
