# Get tasks by start and due dates filters.

`GET /api/tasks/filter-by-date`

Authentication (security requirement alternatives):

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

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

Parameters:

- `tenant` (query, object, optional)
  Type: object
  
  Schema: [Object](https://sourcey-gauzy.pages.dev/api-reference/models/object/index.md)

- `tenantId` (query, string, optional)
  Type: string

- `organization` (query, object, required)
  Type: object
  
  Schema: [Object](https://sourcey-gauzy.pages.dev/api-reference/models/object/index.md)

- `organizationId` (query, string, required)
  Type: string

- `sentTo` (query, string, optional)
  Type: string

- `startDateFrom` (query, string, date-time, optional)
  Type: string, date-time

- `startDateTo` (query, string, date-time, optional)
  Type: string, date-time

- `dueDateFrom` (query, string, date-time, optional)
  Type: string, date-time

- `dueDateTo` (query, string, date-time, optional)
  Type: string, date-time

Responses:

- 200: Tasks retrieved successfully.

- 401: Unauthorized

- 403: Forbidden

- 404: No records found.

## Examples

### cURL

```bash
curl -X GET 'http://localhost:3000/api/tasks/filter-by-date?organizationId=string' \
  -H 'Authorization: Bearer YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('http://localhost:3000/api/tasks/filter-by-date?organizationId=string', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
  },
});

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

### Python

```python
import requests

response = requests.get(
    'http://localhost:3000/api/tasks/filter-by-date?organizationId=string',
    headers={
        'Authorization': 'Bearer YOUR_TOKEN',
    },
)
print(response.text)
```
